SVG or PNG plots in CoCalc Notebooks
NOTE: This is for the Python 3 kernel. It does not work for the SageMath kernels. See 35972.
Default: PNG plots with 2x oversampling ("retina")
This is configured by default on CoCalc via
This plot has a size of about 142kB and works well on modern high resolution screens.
... or as just a simpler PNG without oversampling, with a size of just about 60kB. If you have a high resolution screen, you'll notice fuzziness around sharp edges and characters.
Configure the backend for drawing inline plots to use SVG
The plot below has a size of only 27kB.
Here, SVG grows larger than PNG.
Warning If you up this to 100.000 and plot SVG, your browser might eat up a lot of your computers resources, since it has to draw so much!
This PNG plot has about 110kB.
While this SVG is more than 1MB (compressed it is less, though), and it takes a bit to even render it in your browser. With more elements to draw, the local performance of showing this SVG will suffer even more, while the performance of rendering a PNG is essentially constant.