0

Im trying to save Figures to the same PDF file. The document is created however the figures is acting odd. I have created 3 Figures in 3 different windows. If i save them seppretly it work but when I save all three figures the only thing that show in the PDF is three figures of Figure_3.

Is there a smart way of doing this?

Thanks in advance!

from matplotlib.backends.backend_pdf import PdfPages

pp = PdfPages('Output.pdf')
pp.savefig(Figure_1)
pp.savefig(Figure_2)
pp.savefig(Figure_3)
pp.close()

My code for the figures are:

ax = plt.axes(xscale='log', yscale='log')
Figure_1 = ax.plot(Time, Data1, label = Data1)
Figure_2 = ax.plot(Time, Data2, label = Data2)
Figure_3 = ax.plot(Time, Data3, label = Data3)
Baker
  • 11
  • 2
  • Possible duplicate of [is it possible to append figures to Matplotlib's PdfPages?](https://stackoverflow.com/questions/27419001/is-it-possible-to-append-figures-to-matplotlibs-pdfpages) – Kraay89 Sep 30 '19 at 13:39
  • "the only thing that show in the PDF is three figures of Figure_3" The code you posted above looks good, your error must be prior to this. How are you creating the figures? – tnknepp Sep 30 '19 at 13:48

0 Answers0