Published
Edited
Sep 22, 2018
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
y = d3.scaleLinear()
.domain([0, 1])
.range([height - margin.bottom, margin.top])
Insert cell
informationY = d3.scaleLinear()
.domain([0, d3.extent(informationData.map((d) => d.y))[1]])
.range([height - margin.bottom, margin.top])
Insert cell
Insert cell
yAxis = g => g
.attr("transform", `translate(${margin.left},0)`)
.call(d3.axisLeft(y).ticks(width / 80))

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

data = Array(nTicks + 1)
.fill()
.map((e, i) => xMin + i * (xMax - xMin) / nTicks)
.map((theta) => Object({x: theta, y: twopl(alpha, theta, beta) }))
Insert cell
informationData = Array(nTicks + 1)
.fill()
.map((e, i) => xMin + i * (xMax - xMin) / nTicks)
.map((theta) => Object({ x: theta, y: twopl_information(alpha, theta, beta) }))
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