Published
Edited
Jun 15, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
html`<div style="display: flex; font-family: helvetica">
<div style="flex-basis:50%">${dual} </div>
<div style="flex-basis:50%;">${viewof graph}</div>
</div>`
Insert cell
Insert cell
d3.line()(d3.polygonHull(plusPoints.map(d=>[x(d.x),y(d.y)])))
Insert cell
Insert cell
Insert cell
points = [new Pt(1,1,1), new Pt(-.5,2,1), new Pt(1.5,3,1), new Pt(1.5,2,1), new Pt(1,-2,-1), new Pt(-1,-.5,-1),new Pt(-1,.5,-1), new Pt(0,0,-1)]
Insert cell
plusPoints = points.filter(d=>d.z==1)
Insert cell
minusPoints = points.filter(d=>d.z==-1)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
x = d3.scaleLinear().domain([gp.x_min, gp.x_max]).range([gp.margin,gp.width-gp.margin])
Insert cell
y = d3.scaleLinear().domain([gp.y_min,gp.y_max]).range([gp.height-gp.margin,gp.margin])
Insert cell
y_axis = d3.axisLeft(y).ticks(gp.height/gp.y_ticks)
Insert cell
x_axis = d3.axisBottom(x).ticks(gp.width/gp.x_ticks)
Insert cell
html`<style>
h1 {
font-family: helvetica;
}
p {
font-family: arial;
}
</style>
`
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more