neulab/docprompting-conala huggingface dataset:
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.
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').
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.backends.backend_pdf.pdfRepr(obj)[source]
 
Map Python objects to PDF syntax.
classmatplotlib.backends.backend_pdf.Reference(id)[source]
 
Bases: object PDF reference object. Use PdfFile.reserveObject() to create References.   pdfRepr()[source]

   write(contents, file)[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.
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.
classmatplotlib.backends.backend_pdf.Verbatim(x)[source]
 
Bases: object Store verbatim PDF command content for later inclusion in the stream.   pdfRepr()[source]
matplotlib.backends.backend_pgf.common_texification(text)[source]
 
Do some necessary and/or useful substitutions for texts to be included in LaTeX documents. This distinguishes text-mode and math-mode by replacing the math separator $ with \(\displaystyle %s\). Escaped math separators (\$) are ignored. The following characters are escaped in text segments: _^$%
matplotlib.backends.backend_pgf.FigureCanvas[source]
 
alias of matplotlib.backends.backend_pgf.FigureCanvasPgf
classmatplotlib.backends.backend_pgf.FigureCanvasPgf(figure=None)[source]
 
Bases: matplotlib.backend_bases.FigureCanvasBase   draw()[source]
 
Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk. 
   filetypes={'pdf': 'LaTeX compiled PGF picture', 'pgf': 'LaTeX PGF picture', 'png': 'Portable Network Graphics'}

   get_default_filetype()[source]
 
Return the default savefig file format as specified in rcParams["savefig.format"] (default: 'png'). The returned string does not include a period. This method is overridden in backends that only support a single file type. 
   get_renderer()[source]

   print_pdf(fname_or_fh, *, metadata=None, **kwargs)[source]
 
Use LaTeX to compile a pgf generated figure to pdf. 
   print_pgf(fname_or_fh, **kwargs)[source]
 
Output pgf macros for drawing the figure so it can be included and rendered in latex documents. 
   print_png(fname_or_fh, **kwargs)[source]
 
Use LaTeX to compile a pgf figure to pdf and convert it to png.
filetypes={'pdf': 'LaTeX compiled PGF picture', 'pgf': 'LaTeX PGF picture', 'png': 'Portable Network Graphics'}
print_pdf(fname_or_fh, *, metadata=None, **kwargs)[source]
 
Use LaTeX to compile a pgf generated figure to pdf.
print_pgf(fname_or_fh, **kwargs)[source]
 
Output pgf macros for drawing the figure so it can be included and rendered in latex documents.
print_png(fname_or_fh, **kwargs)[source]
 
Use LaTeX to compile a pgf figure to pdf and convert it to png.
matplotlib.backends.backend_pgf.get_fontspec()[source]
 
Build fontspec preamble from rc.
matplotlib.backends.backend_pgf.get_preamble()[source]
 
Get LaTeX preamble from rc.
exceptionmatplotlib.backends.backend_pgf.LatexError(message, latex_output='')[source]
 
Bases: Exception
classmatplotlib.backends.backend_pgf.LatexManager[source]
 
Bases: object The LatexManager opens an instance of the LaTeX application for determining the metrics of text elements. The LaTeX environment can be modified by setting fonts and/or a custom preamble in rcParams.   get_width_height_descent(text, prop)[source]
 
Get the width, total height, and descent (in TeX points) for a text typeset by the current LaTeX environment. 
   propertystr_cache[source]
get_width_height_descent(text, prop)[source]
 
Get the width, total height, and descent (in TeX points) for a text typeset by the current LaTeX environment.
matplotlib.backends.backend_pgf.make_pdf_to_png_converter()[source]
 
Return a function that converts a pdf file to a png file.
classmatplotlib.backends.backend_pgf.PdfPages(filename, *, keep_empty=True, metadata=None)[source]
 
Bases: object A multi-page PDF file using the pgf backend 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


Plots using PdfPages.savefig will be written to a file at this location. Any older file with the same name is overwritten.  
keep_emptybool, default: True


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. Note that some versions of LaTeX engines may ignore the 'Producer' key and set it to themselves.       close()[source]
 
Finalize this object, running LaTeX in a temporary directory and moving the final pdf file to filename. 
   get_pagecount()[source]
 
Return the current number of pages in the multipage pdf file. 
   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.
close()[source]
 
Finalize this object, running LaTeX in a temporary directory and moving the final pdf file to filename.
draw_tex(gc, x, y, s, prop, angle, ismath='TeX', mtext=None)[source]
classmatplotlib.backends.backend_pgf.TmpDirCleaner(*args, **kwargs)[source]
 
Bases: object [Deprecated] Notes  Deprecated since version 3.4:     staticadd(tmpdir)[source]
 
[Deprecated] Notes  Deprecated since version 3.4:   
   staticcleanup_remaining_tmpdirs()[source]
 
[Deprecated] Notes  Deprecated since version 3.4:   
   remaining_tmpdirs={}
staticadd(tmpdir)[source]
 
[Deprecated] Notes  Deprecated since version 3.4:
staticcleanup_remaining_tmpdirs()[source]
 
[Deprecated] Notes  Deprecated since version 3.4:
matplotlib.backends.backend_ps.convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble, paper_width, paper_height, orientation)[source]
 
When we want to use the LaTeX backend with postscript, we write PSFrag tags to a temporary postscript file, each one marking a position for LaTeX to render some text. convert_psfrags generates a LaTeX document containing the commands to convert those tags to text. LaTeX/dvips produces the postscript file that includes the actual text.
matplotlib.backends.backend_ps.FigureCanvas[source]
 
alias of matplotlib.backends.backend_ps.FigureCanvasPS
classmatplotlib.backends.backend_ps.FigureCanvasPS(figure=None)[source]
 
Bases: matplotlib.backend_bases.FigureCanvasBase   draw()[source]
 
Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk. 
   filetypes={'eps': 'Encapsulated Postscript', 'ps': 'Postscript'}

   fixed_dpi=72

   get_default_filetype()[source]
 
Return the default savefig file format as specified in rcParams["savefig.format"] (default: 'png'). The returned string does not include a period. This method is overridden in backends that only support a single file type. 
   print_eps(outfile, *args, **kwargs)[source]

   print_ps(outfile, *args, **kwargs)[source]
filetypes={'eps': 'Encapsulated Postscript', 'ps': 'Postscript'}
matplotlib.backends.backend_ps.get_bbox_header(lbrt, rotated=False)[source]
 
Return a postscript header string for the given bbox lbrt=(l, b, r, t). Optionally, return rotate command.
classmatplotlib.backends.backend_ps.GraphicsContextPS[source]
 
Bases: matplotlib.backend_bases.GraphicsContextBase [Deprecated] Notes  Deprecated since version 3.4:     get_capstyle()[source]
 
Return the CapStyle. 
   get_joinstyle()[source]
 
Return the JoinStyle.
matplotlib.backends.backend_ps.gs_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False)[source]
 
Use ghostscript's pswrite or epswrite device to distill a file. This yields smaller files without illegal encapsulated postscript operators. The output is low-level, converting text to outlines.
classmatplotlib.backends.backend_ps.PsBackendHelper[source]
 
Bases: object
matplotlib.backends.backend_ps.pstoeps(tmpfile, bbox=None, rotated=False)[source]
 
Convert the postscript to encapsulated postscript. The bbox of the eps file will be replaced with the given bbox argument. If None, original bbox will be used.
matplotlib.backends.backend_ps.quote_ps_string(s)[source]
 
Quote dangerous characters of S for use in a PostScript string constant.
draw_mathtext(gc, x, y, s, prop, angle)[source]
 
Draw the math text using matplotlib.mathtext.
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.backends.backend_ps.xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False)[source]
 
Use ghostscript's ps2pdf and xpdf's/poppler's pdftops to distill a file. This yields smaller files without illegal encapsulated postscript operators. This distiller is preferred, generating high-level postscript output that treats text as text.
matplotlib.backends.backend_svg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_svg.FigureCanvasSVG
classmatplotlib.backends.backend_svg.FigureCanvasSVG(figure=None)[source]
 
Bases: matplotlib.backend_bases.FigureCanvasBase   draw()[source]
 
Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk. 
   filetypes={'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics'}

   fixed_dpi=72

   get_default_filetype()[source]
 
Return the default savefig file format as specified in rcParams["savefig.format"] (default: 'png'). The returned string does not include a period. This method is overridden in backends that only support a single file type. 
   print_svg(filename, *args, dpi=<deprecated parameter>, bbox_inches_restore=None, metadata=None)[source]
 
 Parameters 
 
filenamestr or path-like or file-like


Output target; if a string, a file will be opened for writing.  
metadatadict[str, Any], optional


Metadata in the SVG file defined as key-value pairs of strings, datetimes, or lists of strings, e.g., {'Creator': 'My software',
'Contributor': ['Me', 'My Friend'], 'Title': 'Awesome'}. The standard keys and their value types are:  
str: 'Coverage', 'Description', 'Format', 'Identifier', 'Language', 'Relation', 'Source', 'Title', and 'Type'. 
str or list of str: 'Contributor', 'Creator', 'Keywords', 'Publisher', and 'Rights'. 
str, date, datetime, or tuple of same: 'Date'. If a non-str, then it will be formatted as ISO 8601.  Values have been predefined for 'Creator', 'Date', 'Format', and 'Type'. They can be removed by setting them to None. Information is encoded as Dublin Core Metadata.     
   print_svgz(filename, *args, **kwargs)[source]
filetypes={'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics'}
print_svg(filename, *args, dpi=<deprecated parameter>, bbox_inches_restore=None, metadata=None)[source]
 
 Parameters 
 
filenamestr or path-like or file-like


Output target; if a string, a file will be opened for writing.  
metadatadict[str, Any], optional


Metadata in the SVG file defined as key-value pairs of strings, datetimes, or lists of strings, e.g., {'Creator': 'My software',
'Contributor': ['Me', 'My Friend'], 'Title': 'Awesome'}. The standard keys and their value types are:  
str: 'Coverage', 'Description', 'Format', 'Identifier', 'Language', 'Relation', 'Source', 'Title', and 'Type'. 
str or list of str: 'Contributor', 'Creator', 'Keywords', 'Publisher', and 'Rights'. 
str, date, datetime, or tuple of same: 'Date'. If a non-str, then it will be formatted as ISO 8601.  Values have been predefined for 'Creator', 'Date', 'Format', and 'Type'. They can be removed by setting them to None. Information is encoded as Dublin Core Metadata.
matplotlib.backends.backend_svg.short_float_fmt(x)[source]
 
Create a short string representation of a float, which is %f formatting with trailing zeros and the decimal point removed.
classmatplotlib.backends.backend_svg.XMLWriter(file)[source]
 
Bases: object  Parameters 
 
filewritable text file-like object

     close(id)[source]
 
Close open elements, up to (and including) the element identified by the given identifier.  Parameters 
 id

Element identifier, as returned by the start() method.     
   comment(comment)[source]
 
Add a comment to the output stream.  Parameters 
 
commentstr


Comment text.     
   data(text)[source]
 
Add character data to the output stream.  Parameters 
 
textstr


Character data.     
   element(tag, text=None, attrib={}, **extra)[source]
 
Add an entire element. This is the same as calling start(), data(), and end() in sequence. The text argument can be omitted. 
   end(tag=None, indent=True)[source]
 
Close the current element (opened by the most recent call to start()).  Parameters 
 tag

Element tag. If given, the tag must match the start tag. If omitted, the current element is closed.     
   flush()[source]
 
Flush the output stream. 
   start(tag, attrib={}, **extra)[source]
 
Open a new element. Attributes can be given as keyword arguments, or as a string/string dictionary. The method returns an opaque identifier that can be passed to the close() method, to close all open elements up to and including this one.  Parameters 
 tag

Element tag.  attrib

Attribute dictionary. Alternatively, attributes can be given as keyword arguments.    Returns 
 An element identifier.
close(id)[source]
 
Close open elements, up to (and including) the element identified by the given identifier.  Parameters 
 id

Element identifier, as returned by the start() method.
comment(comment)[source]
 
Add a comment to the output stream.  Parameters 
 
commentstr


Comment text.
data(text)[source]
 
Add character data to the output stream.  Parameters 
 
textstr


Character data.
element(tag, text=None, attrib={}, **extra)[source]
 
Add an entire element. This is the same as calling start(), data(), and end() in sequence. The text argument can be omitted.
end(tag=None, indent=True)[source]
 
Close the current element (opened by the most recent call to start()).  Parameters 
 tag

Element tag. If given, the tag must match the start tag. If omitted, the current element is closed.
start(tag, attrib={}, **extra)[source]
 
Open a new element. Attributes can be given as keyword arguments, or as a string/string dictionary. The method returns an opaque identifier that can be passed to the close() method, to close all open elements up to and including this one.  Parameters 
 tag

Element tag.  attrib

Attribute dictionary. Alternatively, attributes can be given as keyword arguments.    Returns 
 An element identifier.
matplotlib.backends.backend_template.draw_if_interactive()[source]
 
For image backends - is not required. For GUI backends - this should be overridden if drawing should be done in interactive python mode.
matplotlib.backends.backend_template.FigureCanvas[source]
 
alias of matplotlib.backends.backend_template.FigureCanvasTemplate
classmatplotlib.backends.backend_template.FigureCanvasTemplate(figure=None)[source]
 
Bases: matplotlib.backend_bases.FigureCanvasBase The canvas the figure renders into. Calls the draw and print fig methods, creates the renderers, etc. Note: GUI templates will want to connect events for button presses, mouse movements and key presses to functions that call the base class methods button_press_event, button_release_event, motion_notify_event, key_press_event, and key_release_event. See the implementations of the interactive backends for examples.  Attributes 
 
figurematplotlib.figure.Figure


A high-level Figure instance       draw()[source]
 
Draw the figure using the renderer. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk. 
   filetypes={'eps': 'Encapsulated Postscript', 'foo': 'My magic Foo format', 'jpeg': 'Joint Photographic Experts Group', 'jpg': 'Joint Photographic Experts Group', 'pdf': 'Portable Document Format', 'pgf': 'PGF code for LaTeX', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics', 'tif': 'Tagged Image File Format', 'tiff': 'Tagged Image File Format'}

   get_default_filetype()[source]
 
Return the default savefig file format as specified in rcParams["savefig.format"] (default: 'png'). The returned string does not include a period. This method is overridden in backends that only support a single file type. 
   print_foo(filename, *args, **kwargs)[source]
 
Write out format foo. This method is normally called via Figure.savefig and FigureCanvasBase.print_figure, which take care of setting the figure facecolor, edgecolor, and dpi to the desired output values, and will restore them to the original values. Therefore, print_foo does not need to handle these settings.
draw()[source]
 
Draw the figure using the renderer. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk.
filetypes={'eps': 'Encapsulated Postscript', 'foo': 'My magic Foo format', 'jpeg': 'Joint Photographic Experts Group', 'jpg': 'Joint Photographic Experts Group', 'pdf': 'Portable Document Format', 'pgf': 'PGF code for LaTeX', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics', 'tif': 'Tagged Image File Format', 'tiff': 'Tagged Image File Format'}
print_foo(filename, *args, **kwargs)[source]
 
Write out format foo. This method is normally called via Figure.savefig and FigureCanvasBase.print_figure, which take care of setting the figure facecolor, edgecolor, and dpi to the desired output values, and will restore them to the original values. Therefore, print_foo does not need to handle these settings.
matplotlib.backends.backend_template.FigureManager[source]
 
alias of matplotlib.backends.backend_template.FigureManagerTemplate
classmatplotlib.backends.backend_template.FigureManagerTemplate(canvas, num)[source]
 
Bases: matplotlib.backend_bases.FigureManagerBase Helper class for pyplot mode, wraps everything up into a neat bundle. For non-interactive backends, the base class is sufficient.