How can I prevent a specific plot to be shown in Jupyter notebook? I have several plots in a notebook but I want a subset of them to be saved to a file and not shown on the
On Jupyter 6.0, I use the following snippet to selectively not display the matplot lib figures.
import matplotlib as mpl ... backend_ = mpl.get_backend() mpl.use("Agg") # Prevent showing stuff # Your code mpl.use(backend_) # Reset backend