We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6c69eeb + 3e1ad2b commit 6d1917eCopy full SHA for 6d1917e
atmos_cloud_sim_uj_utils/show_plot.py
@@ -2,12 +2,15 @@
2
3
from matplotlib import pyplot
4
from IPython.display import display
5
+from IPython.core.interactiveshell import InteractiveShell
6
+from IPython.core.pylabtools import select_figure_formats
7
from atmos_cloud_sim_uj_utils.temporary_file import TemporaryFile
8
9
-def show_plot(filename=None, fig=pyplot):
10
+def show_plot(filename=None, fig=pyplot, inline_format='svg'):
11
""" the missing click-to-save-as-pdf button for matplotlib/Jupyter (use instead of *.show()) """
12
link = save_and_make_link(fig, filename)
13
+ select_figure_formats(InteractiveShell.instance(), {inline_format})
14
pyplot.show()
15
display(link)
16
0 commit comments