[ Launch: Tributary inlet ] 4692303 by vjpgo
[ Launch: Tributary inlet ] 4692233 by vjpgo
-
-
Save vjpgo/4692303 to your computer and use it in GitHub Desktop.
Tributary inlet
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":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[{"name":"D3 v3","url":"http://d3js.org/d3.v3.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.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} |
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 m = [10, 10, 20, 10], | |
w = 960 - m[1] - m[3], | |
h = 80 - m[0] - m[2], | |
x = d3.scale.linear().domain([.05, .95]).range([0, w]), | |
y = d3.scale.linear().range([0, h]); | |
var svg = d3.select("body").append("svg:svg") | |
.attr("width", w + m[1] + m[3]) | |
.attr("height", h + m[0] + m[2]) | |
.append("svg:g") | |
.attr("transform", "translate(" + m[3] + "," + m[0] + ")"); | |
svg.append("svg:g") | |
.attr("class", "x minor") | |
.attr("transform", "translate(0," + h + ")") | |
.call(d3.svg.axis().scale(x).tickSubdivide(2).tickSize(-6)); | |
svg.append("svg:g") | |
.attr("class", "x axis") | |
.attr("transform", "translate(0," + h + ")") | |
.call(d3.svg.axis().scale(x)); |
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
body { | |
font: 10px sans-serif; | |
} | |
line, path { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} | |
.minor :not(.minor) { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment