doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
concat_matrix=b'cm'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.concat_matrix
curveto=b'c'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.curveto
end_text=b'ET'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.end_text
endpath=b'n'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.endpath
fill=b'f'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.fill
fill_stroke=b'B'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.fill_stroke
grestore=b'Q'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.grestore
gsave=(b'q',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.gsave
lineto=b'l'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.lineto
moveto=(b'm',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.moveto
op
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.op
classmethodpaint_path(fill, stroke)[source] Return the PDF operator to paint a path. Parameters fillbool Fill the path with the fill color. strokebool Stroke the outline of the path with the line color.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.paint_path
rectangle=b're'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.rectangle
selectfont=b'Tf'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.selectfont
setcolor_nonstroke=b'scn'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setcolor_nonstroke
setcolor_stroke=b'SCN'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setcolor_stroke
setcolorspace_nonstroke=(b'cs',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setcolorspace_nonstroke
setcolorspace_stroke=b'CS'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setcolorspace_stroke
setdash=(b'd',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setdash
setgray_nonstroke=b'g'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setgray_nonstroke
setgray_stroke=(b'G',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setgray_stroke
setgstate=b'gs'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setgstate
setlinecap=b'J'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setlinecap
setlinejoin=b'j'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setlinejoin
setlinewidth=b'w'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setlinewidth
setrgb_nonstroke=(b'rg',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setrgb_nonstroke
setrgb_stroke=b'RG'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.setrgb_stroke
shading=b'sh'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.shading
show=b'Tj'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.show
showkern=b'TJ'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.showkern
stroke=b'S'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.stroke
textmatrix=(b'Tm',)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.textmatrix
textpos=b'Td'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.textpos
use_xobject=b'Do'[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Op.use_xobject
classmatplotlib.backends.backend_pdf.Operator(op)[source] Bases: object PDF operator object. op pdfRepr()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Operator
op
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Operator.op
pdfRepr()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Operator.pdfRepr
classmatplotlib.backends.backend_pdf.PdfFile(filename, metadata=None)[source] Bases: object PDF file object. Parameters filenamestr or path-like or file-like Output target; if a string, a file will be opened for writing. metadatadict from strings to strings and dates Information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'), e.g.: {'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}. The standard keys are 'Title', 'Author', 'Subject', 'Keywords', 'Creator', 'Producer', 'CreationDate', 'ModDate', and 'Trapped'. Values have been predefined for 'Creator', 'Producer' and 'CreationDate'. They can be removed by setting them to None. addGouraudTriangles(points, colors)[source] Add a Gouraud triangle shading. Parameters pointsnp.ndarray Triangle vertices, shape (n, 3, 2) where n = number of triangles, 3 = vertices, 2 = x, y. colorsnp.ndarray Vertex colors, shape (n, 3, 1) or (n, 3, 4) as with points, but last dimension is either (gray,) or (r, g, b, alpha). Returns Name, Reference alphaState(alpha)[source] Return name of an ExtGState that sets alpha to the given value. beginStream(id, len, extra=None, png=None)[source] close()[source] Flush all buffers and free all resources. createType1Descriptor(t1font, fontfile)[source] dviFontName(dvifont)[source] Given a dvi font object, return a name suitable for Op.selectfont. This registers the font information in self.dviFontInfo if not yet registered. embedTTF(filename, characters)[source] Embed the TTF font from the named file into the document. endStream()[source] finalize()[source] Write out the various deferred objects and the pdf end matter. fontName(fontprop)[source] 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 of the font. hatchPattern(hatch_style)[source] imageObject(image)[source] Return name of an image XObject representing the given image. markerObject(path, trans, fill, stroke, lw, joinstyle, capstyle)[source] Return name of a marker XObject representing the given path. newPage(width, height)[source] newTextnote(text, positionRect=[- 100, - 100, 0, 0])[source] output(*data)[source] pathCollectionObject(gc, path, trans, padding, filled, stroked)[source] staticpathOperations(path, transform, clip=None, simplify=None, sketch=None)[source] recordXref(id)[source] reserveObject(name='')[source] 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(data)[source] writeExtGSTates()[source] writeFonts()[source] writeGouraudTriangles()[source] writeHatches()[source] writeImages()[source] writeInfoDict()[source] Write out the info dictionary, checking it for good form writeMarkers()[source] writeObject(object, contents)[source] writePath(path, transform, clip=False, sketch=None)[source] writePathCollectionTemplates()[source] writeTrailer()[source] Write out the PDF trailer. writeXref()[source] Write out the xref table.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile
addGouraudTriangles(points, colors)[source] Add a Gouraud triangle shading. Parameters pointsnp.ndarray Triangle vertices, shape (n, 3, 2) where n = number of triangles, 3 = vertices, 2 = x, y. colorsnp.ndarray Vertex colors, shape (n, 3, 1) or (n, 3, 4) as with points, but last dimension is either (gray,) or (r, g, b, alpha). Returns Name, Reference
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.addGouraudTriangles
alphaState(alpha)[source] Return name of an ExtGState that sets alpha to the given value.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.alphaState
beginStream(id, len, extra=None, png=None)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.beginStream
close()[source] Flush all buffers and free all resources.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.close
createType1Descriptor(t1font, fontfile)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.createType1Descriptor
dviFontName(dvifont)[source] Given a dvi font object, return a name suitable for Op.selectfont. This registers the font information in self.dviFontInfo if not yet registered.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.dviFontName
embedTTF(filename, characters)[source] Embed the TTF font from the named file into the document.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.embedTTF
endStream()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.endStream
finalize()[source] Write out the various deferred objects and the pdf end matter.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.finalize
fontName(fontprop)[source] 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 of the font.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.fontName
hatchPattern(hatch_style)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.hatchPattern
imageObject(image)[source] Return name of an image XObject representing the given image.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.imageObject
markerObject(path, trans, fill, stroke, lw, joinstyle, capstyle)[source] Return name of a marker XObject representing the given path.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.markerObject
newPage(width, height)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.newPage
newTextnote(text, positionRect=[- 100, - 100, 0, 0])[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.newTextnote
output(*data)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.output
pathCollectionObject(gc, path, trans, padding, filled, stroked)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.pathCollectionObject
staticpathOperations(path, transform, clip=None, simplify=None, sketch=None)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.pathOperations
recordXref(id)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.recordXref
reserveObject(name='')[source] Reserve an ID for an indirect object. The name is used for debugging in case we forget to print out the object with writeObject.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.reserveObject
write(data)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.write
writeExtGSTates()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeExtGSTates
writeFonts()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeFonts
writeGouraudTriangles()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeGouraudTriangles
writeHatches()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeHatches
writeImages()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeImages
writeInfoDict()[source] Write out the info dictionary, checking it for good form
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeInfoDict
writeMarkers()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeMarkers
writeObject(object, contents)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeObject
writePath(path, transform, clip=False, sketch=None)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writePath
writePathCollectionTemplates()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writePathCollectionTemplates
writeTrailer()[source] Write out the PDF trailer.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeTrailer
writeXref()[source] Write out the xref table.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfFile.writeXref
classmatplotlib.backends.backend_pdf.PdfPages(filename, keep_empty=True, metadata=None)[source] Bases: object A multi-page PDF file. Notes In reality PdfPages is a thin wrapper around PdfFile, in order to avoid confusion when using savefig and forgetting the format argument. Examples >>> 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. Parameters filenamestr or path-like or file-like Plots using PdfPages.savefig will be written to a file at this location. The file is opened at once and any older file with the same name is overwritten. keep_emptybool, optional If set to False, then empty pdf files will be deleted automatically when closed. metadatadict, optional Information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'), e.g.: {'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}. The standard keys are 'Title', 'Author', 'Subject', 'Keywords', 'Creator', 'Producer', 'CreationDate', 'ModDate', and 'Trapped'. Values have been predefined for 'Creator', 'Producer' and 'CreationDate'. They can be removed by setting them to None. attach_note(text, positionRect=[- 100, - 100, 0, 0])[source] Add a new text note to the page to be saved next. The optional positionRect specifies the position of the new note on the page. It is outside the page per default to make sure it is invisible on printouts. close()[source] Finalize this object, making the underlying file a complete PDF file. get_pagecount()[source] Return the current number of pages in the multipage pdf file. infodict()[source] Return a modifiable information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'). keep_empty savefig(figure=None, **kwargs)[source] Save a Figure to this file as a new page. Any other keyword arguments are passed to savefig. Parameters figureFigure or int, default: the active figure The figure, or index of the figure, that is saved to the file.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages
attach_note(text, positionRect=[- 100, - 100, 0, 0])[source] Add a new text note to the page to be saved next. The optional positionRect specifies the position of the new note on the page. It is outside the page per default to make sure it is invisible on printouts.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.attach_note
close()[source] Finalize this object, making the underlying file a complete PDF file.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.close
get_pagecount()[source] Return the current number of pages in the multipage pdf file.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.get_pagecount
infodict()[source] Return a modifiable information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary').
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.infodict
keep_empty
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.keep_empty
savefig(figure=None, **kwargs)[source] Save a Figure to this file as a new page. Any other keyword arguments are passed to savefig. Parameters figureFigure or int, default: the active figure The figure, or index of the figure, that is saved to the file.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.PdfPages.savefig
matplotlib.backends.backend_pdf.pdfRepr(obj)[source] Map Python objects to PDF syntax.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.pdfRepr
classmatplotlib.backends.backend_pdf.Reference(id)[source] Bases: object PDF reference object. Use PdfFile.reserveObject() to create References. pdfRepr()[source] write(contents, file)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Reference
pdfRepr()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Reference.pdfRepr
write(contents, file)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Reference.write
classmatplotlib.backends.backend_pdf.RendererPdf(file, image_dpi, height, width)[source] Bases: matplotlib.backends._backend_pdf_ps.RendererPDFPSBase check_gc(gc, fillcolor=None)[source] draw_gouraud_triangle(gc, points, colors, trans)[source] Draw a Gouraud-shaded triangle. Parameters gcGraphicsContextBase The graphics context. points(3, 2) array-like Array of (x, y) points for the triangle. colors(3, 4) array-like RGBA colors for each point of the triangle. transformmatplotlib.transforms.Transform An affine transform to apply to the points. draw_gouraud_triangles(gc, points, colors, trans)[source] Draw a series of Gouraud triangles. Parameters points(N, 3, 2) array-like Array of N (x, y) points for the triangles. colors(N, 3, 4) array-like Array of N RGBA colors for each point of the triangles. transformmatplotlib.transforms.Transform An affine transform to apply to the points. draw_image(gc, x, y, im, transform=None)[source] Draw an RGBA image. Parameters gcGraphicsContextBase A graphics context with clipping information. xscalar The distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. yscalar The distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. im(N, M, 4) array-like of np.uint8 An array of RGBA pixels. transformmatplotlib.transforms.Affine2DBase If and only if the concrete backend is written such that option_scale_image() returns True, an affine transformation (i.e., an Affine2DBase) may be passed to draw_image(). The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override x and y, and has to be applied before translating the result by x and y (this can be accomplished by adding x and y to the translation vector defined by transform). draw_markers(gc, marker_path, marker_trans, path, trans, rgbFace=None)[source] Draw a marker at each of path's vertices (excluding control points). This provides a fallback implementation of draw_markers that makes multiple calls to draw_path(). Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. Parameters gcGraphicsContextBase The graphics context. marker_transmatplotlib.transforms.Transform An affine transform applied to the marker. transmatplotlib.transforms.Transform An affine transform applied to the path. draw_mathtext(gc, x, y, s, prop, angle)[source] draw_path(gc, path, transform, rgbFace=None)[source] Draw a Path instance using the given affine transform. draw_path_collection(gc, master_transform, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls, offset_position)[source] Draw a collection of paths selecting drawing properties from the lists facecolors, edgecolors, linewidths, linestyles and antialiaseds. offsets is a list of offsets to apply to each of the paths. The offsets in offsets are first transformed by offsetTrans before being applied. offset_position is unused now, but the argument is kept for backwards compatibility. This provides a fallback implementation of draw_path_collection() that makes multiple calls to draw_path(). Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods _iter_collection_raw_paths() and _iter_collection() are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of draw_path_collection() can be made globally. draw_tex(gc, x, y, s, prop, angle, *, mtext=None)[source] draw_text(gc, x, y, s, prop, angle, ismath=False, mtext=None)[source] Draw the text instance. Parameters gcGraphicsContextBase The graphics context. xfloat The x location of the text in display coords. yfloat The y location of the text baseline in display coords. sstr The text string. propmatplotlib.font_manager.FontProperties The font properties. anglefloat The rotation angle in degrees anti-clockwise. mtextmatplotlib.text.Text The original text object to be rendered. Notes Note for backend implementers: When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: if 0: bbox_artist(self, renderer) to if 1, and then the actual bounding box will be plotted along with your text. encode_string(s, fonttype)[source] finalize()[source] get_image_magnification()[source] Get the factor by which to magnify images passed to draw_image(). Allows a backend to have images at a different resolution to other artists. propertymathtext_parser[source] new_gc()[source] Return an instance of a GraphicsContextBase.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf
check_gc(gc, fillcolor=None)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.check_gc
draw_gouraud_triangle(gc, points, colors, trans)[source] Draw a Gouraud-shaded triangle. Parameters gcGraphicsContextBase The graphics context. points(3, 2) array-like Array of (x, y) points for the triangle. colors(3, 4) array-like RGBA colors for each point of the triangle. transformmatplotlib.transforms.Transform An affine transform to apply to the points.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_gouraud_triangle
draw_gouraud_triangles(gc, points, colors, trans)[source] Draw a series of Gouraud triangles. Parameters points(N, 3, 2) array-like Array of N (x, y) points for the triangles. colors(N, 3, 4) array-like Array of N RGBA colors for each point of the triangles. transformmatplotlib.transforms.Transform An affine transform to apply to the points.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_gouraud_triangles
draw_image(gc, x, y, im, transform=None)[source] Draw an RGBA image. Parameters gcGraphicsContextBase A graphics context with clipping information. xscalar The distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. yscalar The distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. im(N, M, 4) array-like of np.uint8 An array of RGBA pixels. transformmatplotlib.transforms.Affine2DBase If and only if the concrete backend is written such that option_scale_image() returns True, an affine transformation (i.e., an Affine2DBase) may be passed to draw_image(). The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override x and y, and has to be applied before translating the result by x and y (this can be accomplished by adding x and y to the translation vector defined by transform).
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_image
draw_markers(gc, marker_path, marker_trans, path, trans, rgbFace=None)[source] Draw a marker at each of path's vertices (excluding control points). This provides a fallback implementation of draw_markers that makes multiple calls to draw_path(). Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. Parameters gcGraphicsContextBase The graphics context. marker_transmatplotlib.transforms.Transform An affine transform applied to the marker. transmatplotlib.transforms.Transform An affine transform applied to the path.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_markers
draw_mathtext(gc, x, y, s, prop, angle)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_mathtext
draw_path(gc, path, transform, rgbFace=None)[source] Draw a Path instance using the given affine transform.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_path
draw_path_collection(gc, master_transform, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls, offset_position)[source] Draw a collection of paths selecting drawing properties from the lists facecolors, edgecolors, linewidths, linestyles and antialiaseds. offsets is a list of offsets to apply to each of the paths. The offsets in offsets are first transformed by offsetTrans before being applied. offset_position is unused now, but the argument is kept for backwards compatibility. This provides a fallback implementation of draw_path_collection() that makes multiple calls to draw_path(). Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods _iter_collection_raw_paths() and _iter_collection() are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of draw_path_collection() can be made globally.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection
draw_tex(gc, x, y, s, prop, angle, *, mtext=None)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_tex
draw_text(gc, x, y, s, prop, angle, ismath=False, mtext=None)[source] Draw the text instance. Parameters gcGraphicsContextBase The graphics context. xfloat The x location of the text in display coords. yfloat The y location of the text baseline in display coords. sstr The text string. propmatplotlib.font_manager.FontProperties The font properties. anglefloat The rotation angle in degrees anti-clockwise. mtextmatplotlib.text.Text The original text object to be rendered. Notes Note for backend implementers: When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: if 0: bbox_artist(self, renderer) to if 1, and then the actual bounding box will be plotted along with your text.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.draw_text
encode_string(s, fonttype)[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.encode_string
finalize()[source]
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.finalize
get_image_magnification()[source] Get the factor by which to magnify images passed to draw_image(). Allows a backend to have images at a different resolution to other artists.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.get_image_magnification
new_gc()[source] Return an instance of a GraphicsContextBase.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.RendererPdf.new_gc
classmatplotlib.backends.backend_pdf.Stream(id, len, file, extra=None, png=None)[source] Bases: object 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(). Parameters idint Object id of the stream. lenReference or None An unused Reference object for the length of the stream; None means to use a memory buffer so the length can be inlined. filePdfFile The underlying object to write the stream to. extradict from Name to anything, or None Extra key-value pairs to include in the stream header. pngdict or None If the data is already png encoded, the decode parameters. compressobj end()[source] Finalize stream. extra file id len pdfFile pos write(data)[source] Write some data on the stream.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Stream
compressobj
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Stream.compressobj
end()[source] Finalize stream.
matplotlib.backend_pdf_api#matplotlib.backends.backend_pdf.Stream.end