graph = {
const [amin,amax] = [1e-4,1e2];
const F = frame(
{
scale: d3.scaleLog().domain([amin,amax]),
label: 'yyy',
grid: true
},
{
scale: d3.scaleLog().domain([amax**-4,amin**-4]),
label: 'The y axis',
grid: true
},
{
w:0.7 * width,
h:400
}
);
const a = [amin, amax];
for(const w of [-1, 0, 1/3]) {
const eps = a.map(a => a ** (-3*(1+w)));
F.curve(a, eps, {stroke:'red', strokeWidth: 2});
}
F.hline(1e4, {x2:1, style:{stroke:'blue'}});
F.vline(1, {y2:1e4, style:{stroke:'green'}});
F.dot(1,1e4, {style:{fill:'blue'}});
return F.node();
}