[ Launch: Tributary inlet ] 7515910 by DeBraid
-
-
Save DeBraid/7515910 to your computer and use it in GitHub Desktop.
simple scatterplot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"simple scatterplot","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/9zG4xKC.png"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var svg = d3.select("svg"); | |
var data = [42, 14, 67, 55, 33, 11, 77, 34, 23, 12, 13]; | |
var groups = svg.selectAll("g") | |
.data(data) | |
.enter() | |
.append("g"); | |
var circles = groups.append("circle") | |
.attr({ | |
cx: function(d,i) { | |
return (i+1)*48; | |
}, | |
cy: function(d,i) { | |
return d*5.56; | |
}, | |
r: 20, | |
fill: "tomato", | |
stroke: "brown", | |
"stroke-width": 4, | |
"stroke-opacity": 0.5 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment