If you call area.setAttribute in a different cell, then youāll need to name, import, and execute that into your other notebook as well for it to take effect. Alternatively, you could bundle it all into a single cell. Something like
{
let area = ...
area.setAttribute(āfont-sizeā, 30);
return area
}
Of course, that will set the global font-size for the whole figure. You might also inspect the SVG and use CSS selectors to target the text more specifically. Something like so:
{
let p = Plot.plot({
marks: [Plot.line(d3.range(0, 20, 0.1).map((t) => [t, Math.sin(t)]))],
x: { label: "t" },
y: { label: "y" },
margin: 60
});
let sel = d3.select(p).selectAll("svg > g > text").style("font-size", "20px");
return p;
}
Of course, that will be quite fragile and would depend on the exact structure of your output. Proper class names would be ideal.
@Fil As far as I can tell, the className option only applies at the top level, not to marks, axes, and such.