https://matplotlib.org/stable/api/backend_pgf_api.html#matpl...
In Jupyter, that looks like
!sudo apt-get -y install \ texlive-xetex texlive-fonts-recommended texlive-plain-generic \ texlive-latex-extra texlive-fonts-recommended dvipng cm-super \ >/dev/null import matplotlib from matplotlib.backends.backend_pgf import FigureCanvasPgf matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf) import matplotlib.pyplot as plt from pdf2image import convert_from_path plt.rcParams.update({ 'font.family': 'serif', 'font.serif': [], 'font.size': 8, 'text.usetex': True, 'pgf.rcfonts': False, })
Generate your figure with
plt.savefig('foo.pdf', transparent=True)
gbacon•1h ago
https://matplotlib.org/stable/api/backend_pgf_api.html#matpl...
In Jupyter, that looks like
Using `convert_from_path` is for showing cached images.Generate your figure with