Skip to content

Instantly share code, notes, and snippets.

@debpu06
Last active September 17, 2023 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debpu06/d877c18d4c4ad6b9456bb712e372a16c to your computer and use it in GitHub Desktop.
Save debpu06/d877c18d4c4ad6b9456bb712e372a16c to your computer and use it in GitHub Desktop.
pp = PdfPages(outputfolder + 'my_pdf_name.pdf') # create a new instance of PdfPages specifying the file location
figs = [fig1, fig2, fig3] # all of the figures to add to the file in a list
for fig in figs: # loop through each figure
fig.savefig(pp, format='pdf') # save that figure to the file, specifying pdf format
pp.close() # close the file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment