A PDF matplotlib backend Author: Jouni K Seppï¿½nen <email@example.com>
The canvas the figure renders into. Calls the draw and print fig methods, creates the renderers, etc...
figure - A Figure instance
PDF name object.
PDF operator object.
PDF file object.
Return name of an ExtGState that sets alpha to the given value
Embed the TTF font from the named file into the document.
Select a font based on fontprop and return a name suitable for Op.selectfont. If fontprop is a string, it will be interpreted as the filename (or dvi name) of the font.
Return name of an image XObject representing the given image.
Return name of a marker XObject representing the given path.
Reserve an ID for an indirect object. The name is used for debugging in case we forget to print out the object with writeObject.
Write out the info dictionary, checking it for good form
Write out the PDF trailer.
Write out the xref table.
A multi-page PDF file.
>>> import matplotlib.pyplot as plt >>> # Initialize: >>> with PdfPages('foo.pdf') as pdf: ... # As many times as you like, create a figure fig and save it: ... fig = plt.figure() ... pdf.savefig(fig) ... # When no figure is specified the current figure is saved ... pdf.savefig()
Create a new PdfPages object.
filename: str :
keep_empty: bool, optional :
Finalize this object, making the underlying file a complete PDF file.
Returns the current number of pages in the multipage pdf file.
Return a modifiable information dictionary object (see PDF reference section 10.2.1 ‘Document Information Dictionary’).
Saves a Figure to this file as a new page.
Any other keyword arguments are passed to savefig().
figure: :class:`~matplotlib.figure.Figure` or int, optional :
PDF reference object. Use PdfFile.reserveObject() to create References.
PDF stream object.
This has no pdfRepr method. Instead, call begin(), then output the contents of the stream by calling write(), and finally call end().
id: object id of stream; len: an unused Reference object for the length of the stream, or None (to use a memory buffer); file: a PdfFile; extra: a dictionary of extra key-value pairs to include in the stream header
Write some data on the stream.
Make one string from sequence of strings, with whitespace in between. The whitespace is chosen to form lines of at most linelen characters, if possible.
Create a new figure manager instance
Create a new figure manager instance for the given figure.
Map Python objects to PDF syntax.