Skip to content

Instantly share code, notes, and snippets.

View MaykThewessen's full-sized avatar

Mayk Thewessen MaykThewessen

View GitHub Profile
@briandk
briandk / vector-graphic-plots-preamble.py
Last active May 22, 2024 10:21
Preamble for high resolution and vector-graphic plots in Jupyter Notebook
# Make plots inline
%matplotlib inline
# Make inline plots vector graphics instead of raster graphics
# from IPython.display import set_matplotlib_formats
# set_matplotlib_formats('pdf', 'svg')
# DeprecationWarning: `set_matplotlib_formats` is deprecated since IPython 7.23, directly use `matplotlib_inline.backend_inline.set_matplotlib_formats()`
import matplotlib_inline
matplotlib_inline.backend_inline.set_matplotlib_formats('retina', 'png', quality = 100)