Save a multipage PDF of all the current plots, rather than individual image files.
This function will utilize the matplotlib PDF backend to create a new PDF, and for every plot that the PlotCollection currently has, it will render a new page into that PDF. The pages will be in the order of the current plots.
Parameters : | filename : string
author : string, optional
title : string, optional
keywords : string, optional
subject : string, optional
creator : string, optional
producer : string, optional
creation_date : string, optional
|
---|---|
Returns : | Nothing : |
Examples
This will set up a new PlotCollection, add some plots, and then save it as a PDF.
>>> pc = PlotCollection(pf, [0.5, 0.5, 0.5])
>>> pc.add_projection("Density", 0)
>>> pc.add_projection("Density", 1)
>>> pc.add_projection("Density", 2)
>>> pc.set_width(0.5, 'pc')
>>> dd = pf.h.all_data()
>>> pc.add_phase_object(dd, ["Density", "Temperature", "CellMassMsun"],
... weight = None)
>>> pc.save_book("my_plots.pdf", author="Matthew Turk",
... title="Fun plots")