> Scales are functions that map from an input domain to an output range
`
mpg_domain=d3.extent(data2[1])
x=[1,2,3,4]
mpg_extent=d3.extent(data2,d=>{
returnd.mpg;
})
disp_ext=d3.extent(data2,d=>{
returnd.disp;
})
x_scale=d3
.scaleLinear()
.domain([60,400])
.range([0,w])// creates a linear scale
y_scale=d3
.scaleLinear()
.domain([10,30])
.range([h,0])
x_axis=d3.axisBottom(x_scale)
y_axis=d3.axisLeft(y_scale)
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.