I am puzzled by why a plot is shown in Jupyterlab despite I take all precautions for it not to be, when I call savefig().
In short, if I do
using Plots
plot(range, range.^2);
savefig("a.pdf");
nothing
in Jupyterlab, then the plot is shown, despite I put semicolons, and I set the output of the cell to be nothing.
If I do
plot(range, range.^2);
no plot is shown, as desired.
If I do
plot(range, range.^2);
and in a separate cell
savefig("a.pdf")
no plot is shown!
Furthermore, if I set “fmt = :svg” to get SVG plots by default, I do get SVG plots when using “plot()” but savefig() always produces PNG plots, and there is no way to silence this production in the Jupyterlab cell output.
There should be a weird interaction between Plots and Jupyterlab. I am triying to understand what happens but I try also to see if anybody more expert than me has any insight. I have collected my tests in this notebook: https://gist.github.com/3ffefb4183fe026d5572baecdcde8808 .