[ Launch: Tributary inlet ] 5379708 by jpmarindiaz
-
-
Save jpmarindiaz/5379708 to your computer and use it in GitHub Desktop.
Tributary inlet
This file contains hidden or 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":[],"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":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
This file contains hidden or 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 estData = []; | |
var est1Data = [], est2Data = []; | |
var resEstms = data.lines; | |
var resEst1 = resEstms.pdf; | |
var resEst1X = resEst1.x; | |
var resEst1Y = resEst1.y; | |
var est1Length = resEst1X.length; | |
for (var i = 0; i < est1Length; i++) { | |
est1Data.push({ "title": "Estimate 1", "x": resEst1X[i], "y": resEst1Y[i] }); | |
} | |
estData.push(est1Data); | |
var margin = { top: 20, right: 10, bottom: 20, left: 10 }; | |
var width = 600 - margin.left - margin.right, | |
height = 300 - margin.top - margin.bottom; | |
var x = d3 | |
.scale | |
.linear() | |
.domain([0, 120]) | |
.range([0, width]), | |
y = d3 | |
.scale | |
.linear() | |
.domain([-0.01, 0.01]) | |
.range([height, 0]), | |
color = d3 | |
.scale | |
.category10(), | |
line = d3 | |
.svg | |
.line() | |
.interpolate("basis") | |
.x(function (d, i) { return x(d.x); }) | |
.y(function (d, i) { return y(d.y * 1.2); }); | |
var xAxis = d3.svg.axis() | |
.scale(x) | |
.orient("bottom"); | |
var yAxis = d3.svg.axis() | |
.scale(y) | |
.orient("left").ticks(3); | |
d3.select("body").append("svg").attr("width", width + margin.left + margin.right).attr("height", height + margin.top + margin.bottom).append("g").attr("transform", "translate(" + (margin.left+40) + "," + margin.top + ")"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment