Skip to content

Instantly share code, notes, and snippets.

@ariaz
Created July 8, 2012 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ariaz/3072920 to your computer and use it in GitHub Desktop.
Save ariaz/3072920 to your computer and use it in GitHub Desktop.
just another inlet to tributary
var ariel;
d3.json('/static/img.json', function(data){ ariel = data;});
d = [20,40,296, 335, 100, 120, -95];
var width = 500,
height = 112,
margin = 10;
var x_scale = d3.scale.linear()
.range([margin, width-margin])
.domain([0,240]);
var y_scale = d3.scale.linear()
.range([height-margin, margin])
.domain([0,46]);
var svg = d3.select("svg")
.attr("width", 500)
.attr("height",505)
.append("svg:g");
var circle = svg.selectAll("g.circle")
.data(d)
.enter().append("circle");
t = d3.rgb(32,22345,130);
d3.selectAll("circle")
.attr("cx", function(d){return d})
.attr("cy", function(d){return d})
.attr("r",10)
.attr("fill",function(d){return t});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment