I create a figure with matplotlib figure, axes = plt.subplots(nrows=3, ncols=2), plot various stuff axes[0,0].pcolormesh(...) and then export the figure to PDF figure.savefig('figure.pdf') or to PNG figure.savefig('figure.png').
I have to use PNG, because the PDF-file would be huge, but this makes the figure labels and other texts blurry.
Is there a way to export the figure to PDF -- so that labels, etc. are vector graphics -- but with the plots being exported to PNG within the resulting PDF-file? In short: export to PDF, but plots within that PDF to PNG (for small file sizes).
