[ Launch: test ] 26c5380f4c11f8a9a236 by lewis500
-
-
Save lewis500/26c5380f4c11f8a9a236 to your computer and use it in GitHub Desktop.
test
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":"test","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},"main.css":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"tab":"edit","display_percent":0.7,"thumbnail":"http://i.imgur.com/Z4ghHZY.png","fullscreen":false,"ajax-caching":true} |
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").append("g") | |
.attr("transform","translate(20,20)") | |
var y = d3.scale.linear().domain([0,2]).range([200, 0]); | |
var x = d3.scale.linear().domain([0,200]).range([0,200]); | |
var data = d3.range(0,200).map(function(d){ | |
return [d, prob(d/200)] ; | |
}); | |
var path = d3.svg.line() | |
.x(function(d){return x(d[0])}) | |
.y(function(d){ return y(d[1]);}); | |
var line = svg.append("path").datum(data).attr("d",path).attr("stroke","black") | |
function prob(d) { | |
return 4 * (0.5 - Math.abs(0.5 - d)); | |
} | |
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
path { | |
fill: none; | |
stroke: black 2px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment