neulab/docprompting-conala huggingface dataset:
classmatplotlib.backend_tools.ZoomPanBase(*args)[source]
 
Bases: matplotlib.backend_tools.ToolToggleBase Base class for ToolZoom and ToolPan.   disable(event)[source]
 
Release the canvas and disconnect press/release events. 
   enable(event)[source]
 
Connect press/release events and lock the canvas. 
   scroll_zoom(event)[source]

   trigger(sender, event, data=None)[source]
 
Calls enable or disable based on toggled value.
matplotlib.backends  backend_mixed backend_template backend_agg backend_cairo backend_gtk3agg, backend_gtk3cairo backend_gtk4agg, backend_gtk4cairo backend_nbagg backend_pdf backend_pgf backend_ps backend_qtagg, backend_qtcairo backend_svg backend_tkagg, backend_tkcairo backend_webagg backend_wxagg, backend_wxcairo
matplotlib.backends.backend_agg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_agg.FigureCanvasAgg
buffer_rgba()[source]
 
Get the image as a memoryview to the renderer's buffer. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
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.
print_jpeg(filename_or_obj, *args, pil_kwargs=None, **kwargs)[source]
 
Write the figure to a JPEG file.  Parameters 
 
filename_or_objstr or path-like or file-like


The file to write to.    Other Parameters 
 
pil_kwargsdict, optional


Additional keyword arguments that are passed to PIL.Image.Image.save when saving the figure.
print_jpg(filename_or_obj, *args, pil_kwargs=None, **kwargs)[source]
 
Write the figure to a JPEG file.  Parameters 
 
filename_or_objstr or path-like or file-like


The file to write to.    Other Parameters 
 
pil_kwargsdict, optional


Additional keyword arguments that are passed to PIL.Image.Image.save when saving the figure.
print_png(filename_or_obj, *args, metadata=None, pil_kwargs=None)[source]
 
Write the figure to a PNG file.  Parameters 
 
filename_or_objstr or path-like or file-like


The file to write to.  
metadatadict, optional


Metadata in the PNG file as key-value pairs of bytes or latin-1 encodable strings. According to the PNG specification, keys must be shorter than 79 chars. The PNG specification defines some common keywords that may be used as appropriate:  Title: Short (one line) title or caption for image. Author: Name of image's creator. Description: Description of image (possibly long). Copyright: Copyright notice. Creation Time: Time of original image creation (usually RFC 1123 format). Software: Software used to create the image. Disclaimer: Legal disclaimer. Warning: Warning of nature of content. Source: Device used to create the image. Comment: Miscellaneous comment; conversion from other image format.  Other keywords may be invented for other purposes. If 'Software' is not given, an autogenerated value for Matplotlib will be used. This can be removed by setting it to None. For more details see the PNG specification.  
pil_kwargsdict, optional


Keyword arguments passed to PIL.Image.Image.save. If the 'pnginfo' key is present, it completely overrides metadata, including the default 'Software' key.
print_tif(filename_or_obj, *, pil_kwargs=None)[source]
print_tiff(filename_or_obj, *, pil_kwargs=None)[source]
tostring_argb()[source]
 
Get the image as ARGB bytes. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
tostring_rgb()[source]
 
Get the image as RGB bytes. draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.
draw_mathtext(gc, x, y, s, prop, angle)[source]
 
Draw mathtext using matplotlib.mathtext.
get_content_extents()[source]
 
[Deprecated] Notes  Deprecated since version 3.4:
restore_region(region, bbox=None, xy=None)[source]
 
Restore the saved region. If bbox (instance of BboxBase, or its extents) is given, only the region specified by the bbox will be restored. xy (a pair of floats) optionally specifies the new position (the LLC of the original region, not the LLC of the bbox) where the region will be restored. >>> region = renderer.copy_from_bbox()
>>> x1, y1, x2, y2 = region.get_extents()
>>> renderer.restore_region(region, bbox=(x1+dx, y1, x2, y2),
...                         xy=(x1-dx, y1))
start_filter()[source]
 
Start filtering. It simply create a new canvas (the old one is saved).
stop_filter(post_processing)[source]
 
Save the plot in the current canvas as a image and apply the post_processing function.  def post_processing(image, dpi):

# ny, nx, depth = image.shape # image (numpy array) has RGBA channels and has a depth of 4. ... # create a new_image (numpy array of 4 channels, size can be # different). The resulting image may have offsets from # lower-left corner of the original image return new_image, offset_x, offset_y   The saved renderer is restored and the returned image from post_processing is plotted (using draw_image) on it.
tostring_rgba_minimized()[source]
 
[Deprecated] Notes  Deprecated since version 3.4:
matplotlib.backends.backend_cairo.FigureCanvas[source]
 
alias of matplotlib.backends.backend_cairo.FigureCanvasCairo
classmatplotlib.backends.backend_cairo.FigureCanvasCairo(figure=None)[source]
 
Bases: matplotlib.backend_bases.FigureCanvasBase   copy_from_bbox(bbox)[source]

   print_pdf(fobj, *, orientation='portrait')

   print_png(fobj)[source]

   print_ps(fobj, *, orientation='portrait')

   print_raw(fobj)[source]

   print_rgba(fobj)[source]

   print_svg(fobj, *, orientation='portrait')

   print_svgz(fobj, *, orientation='portrait')

   restore_region(region)[source]
classmatplotlib.backends.backend_cairo.GraphicsContextCairo(renderer)[source]
 
Bases: matplotlib.backend_bases.GraphicsContextBase   get_rgb()[source]
 
Return a tuple of three or four floats from 0-1. 
   restore()[source]
 
Restore the graphics context from the stack - needed only for backends that save graphics contexts on a stack. 
   set_alpha(alpha)[source]
 
Set the alpha value used for blending - not supported on all backends. If alpha=None (the default), the alpha components of the foreground and fill colors will be used to set their respective transparencies (where applicable); otherwise, alpha will override them. 
   set_antialiased(b)[source]
 
Set whether object should be drawn with antialiased rendering. 
   set_capstyle(cs)[source]
 
Set how to draw endpoints of lines.  Parameters 
 
csCapStyle or {'butt', 'projecting', 'round'}

   
   set_clip_path(path)[source]
 
Set the clip path to a TransformedPath or None. 
   set_clip_rectangle(rectangle)[source]
 
Set the clip rectangle to a Bbox or None. 
   set_dashes(offset, dashes)[source]
 
Set the dash style for the gc.  Parameters 
 
dash_offsetfloat


The offset (usually 0).  
dash_listarray-like or None


The on-off sequence as points. None specifies a solid line.     Notes See p. 107 of to PostScript blue book for more info. 
   set_foreground(fg, isRGBA=None)[source]
 
Set the foreground color.  Parameters 
 
fgcolor


isRGBAbool


If fg is known to be an (r, g, b, a) tuple, isRGBA can be set to True to improve performance.     
   set_joinstyle(js)[source]
 
Set how to draw connections between line segments.  Parameters 
 
jsJoinStyle or {'miter', 'round', 'bevel'}

   
   set_linewidth(w)[source]
 
Set the linewidth in points.
set_dashes(offset, dashes)[source]
 
Set the dash style for the gc.  Parameters 
 
dash_offsetfloat


The offset (usually 0).  
dash_listarray-like or None


The on-off sequence as points. None specifies a solid line.     Notes See p. 107 of to PostScript blue book for more info.
set_foreground(fg, isRGBA=None)[source]
 
Set the foreground color.  Parameters 
 
fgcolor


isRGBAbool


If fg is known to be an (r, g, b, a) tuple, isRGBA can be set to True to improve performance.
draw_image(gc, x, y, im)[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, transform, 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.
classmatplotlib.backends.backend_mixed.MixedModeRenderer(figure, width, height, dpi, vector_renderer, raster_renderer_class=None, bbox_inches_restore=None)[source]
 
Bases: object A helper class to implement a renderer that switches between vector and raster drawing. An example may be a PDF writer, where most things are drawn with PDF vector commands, but some very complex objects, such as quad meshes, are rasterised and then output as images.  Parameters 
 
figurematplotlib.figure.Figure


The figure instance.  
widthscalar


The width of the canvas in logical units  
heightscalar


The height of the canvas in logical units  
dpifloat


The dpi of the canvas  
vector_renderermatplotlib.backend_bases.RendererBase


An instance of a subclass of RendererBase that will be used for the vector drawing.  
raster_renderer_classmatplotlib.backend_bases.RendererBase


The renderer class to use for the raster drawing. If not provided, this will use the Agg backend (which is currently the only viable option anyway.)       start_rasterizing()[source]
 
Enter "raster" mode. All subsequent drawing commands (until stop_rasterizing is called) will be drawn with the raster backend. 
   stop_rasterizing()[source]
 
Exit "raster" mode. All of the drawing that was done since the last start_rasterizing call will be copied to the vector backend by calling draw_image.
start_rasterizing()[source]
 
Enter "raster" mode. All subsequent drawing commands (until stop_rasterizing is called) will be drawn with the raster backend.
stop_rasterizing()[source]
 
Exit "raster" mode. All of the drawing that was done since the last start_rasterizing call will be copied to the vector backend by calling draw_image.
classmatplotlib.backends.backend_nbagg.CommSocket(manager)[source]
 
Bases: object Manages the Comm connection between IPython and the browser (client). Comms are 2 way, with the CommSocket being able to publish a message via the send_json method, and handle a message with on_message. On the JS side figure.send_message and figure.ws.onmessage do the sending and receiving respectively.   is_open()[source]

   on_close()[source]

   on_message(message)[source]

   send_binary(blob)[source]

   send_json(content)[source]
matplotlib.backends.backend_nbagg.connection_info()[source]
 
Return a string showing the figure and connection status for the backend. This is intended as a diagnostic tool, and not for general use.
matplotlib.backends.backend_nbagg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_nbagg.FigureCanvasNbAgg
classmatplotlib.backends.backend_nbagg.FigureCanvasNbAgg(*args, **kwargs)[source]
 
Bases: matplotlib.backends.backend_webagg_core.FigureCanvasWebAggCore
matplotlib.backends.backend_nbagg.FigureManager[source]
 
alias of matplotlib.backends.backend_nbagg.FigureManagerNbAgg
classmatplotlib.backends.backend_nbagg.FigureManagerNbAgg(canvas, num)[source]
 
Bases: matplotlib.backends.backend_webagg_core.FigureManagerWebAgg   ToolbarCls[source]
 
alias of matplotlib.backends.backend_nbagg.NavigationIPy 
   clearup_closed()[source]
 
Clear up any closed Comms. 
   propertyconnected

   destroy()[source]

   display_js()[source]

   classmethodget_javascript(stream=None)[source]

   remove_comm(comm_id)[source]

   reshow()[source]
 
A special method to re-show the figure in the notebook. 
   show()[source]
 
For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception, unless running headless (i.e. on Linux with an unset DISPLAY); this exception is converted to a warning in Figure.show.
reshow()[source]
 
A special method to re-show the figure in the notebook.
ToolbarCls[source]
 
alias of matplotlib.backends.backend_nbagg.NavigationIPy
classmatplotlib.backends.backend_nbagg.NavigationIPy(canvas)[source]
 
Bases: matplotlib.backends.backend_webagg_core.NavigationToolbar2WebAgg   toolitems=[('Home', 'Reset original view', 'fa fa-home icon-home', 'home'), ('Back', 'Back to previous view', 'fa fa-arrow-left icon-arrow-left', 'back'), ('Forward', 'Forward to next view', 'fa fa-arrow-right icon-arrow-right', 'forward'), (None, None, None, None), ('Pan', 'Left button pans, Right button zooms\nx/y fixes axis, CTRL fixes aspect', 'fa fa-arrows icon-move', 'pan'), ('Zoom', 'Zoom to rectangle\nx/y fixes axis', 'fa fa-square-o icon-check-empty', 'zoom'), (None, None, None, None), ('Download', 'Download plot', 'fa fa-floppy-o icon-save', 'download')]
toolitems=[('Home', 'Reset original view', 'fa fa-home icon-home', 'home'), ('Back', 'Back to previous view', 'fa fa-arrow-left icon-arrow-left', 'back'), ('Forward', 'Forward to next view', 'fa fa-arrow-right icon-arrow-right', 'forward'), (None, None, None, None), ('Pan', 'Left button pans, Right button zooms\nx/y fixes axis, CTRL fixes aspect', 'fa fa-arrows icon-move', 'pan'), ('Zoom', 'Zoom to rectangle\nx/y fixes axis', 'fa fa-square-o icon-check-empty', 'zoom'), (None, None, None, None), ('Download', 'Download plot', 'fa fa-floppy-o icon-save', 'download')]
matplotlib.backends.backend_nbagg.new_figure_manager_given_figure(num, figure)[source]
 
Create a new figure manager instance for the given figure.
matplotlib.backends.backend_nbagg.show(block=None)[source]
 
Show all figures. show blocks by calling mainloop if block is True, or if it is None and we are neither in IPython's %pylab mode, nor in interactive mode.
matplotlib.backends.backend_pdf.FigureCanvas[source]
 
alias of matplotlib.backends.backend_pdf.FigureCanvasPdf
classmatplotlib.backends.backend_pdf.FigureCanvasPdf(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': 'Portable Document Format'}

   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_pdf(filename, *, dpi=<deprecated parameter>, bbox_inches_restore=None, metadata=None)[source]
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_pdf(filename, *, dpi=<deprecated parameter>, bbox_inches_restore=None, metadata=None)[source]
matplotlib.backends.backend_pdf.fill(strings, linelen=75)[source]
 
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.
classmatplotlib.backends.backend_pdf.GraphicsContextPdf(file)[source]
 
Bases: matplotlib.backend_bases.GraphicsContextBase   alpha_cmd(alpha, forced, effective_alphas)[source]

   capstyle_cmd(style)[source]

   capstyles={'butt': 0, 'projecting': 2, 'round': 1}

   clip_cmd(cliprect, clippath)[source]
 
Set clip rectangle. Calls pop() and push(). 
   commands=((('_cliprect', '_clippath'), <function GraphicsContextPdf.clip_cmd>), (('_alpha', '_forced_alpha', '_effective_alphas'), <function GraphicsContextPdf.alpha_cmd>), (('_capstyle',), <function GraphicsContextPdf.capstyle_cmd>), (('_fillcolor',), <function GraphicsContextPdf.fillcolor_cmd>), (('_joinstyle',), <function GraphicsContextPdf.joinstyle_cmd>), (('_linewidth',), <function GraphicsContextPdf.linewidth_cmd>), (('_dashes',), <function GraphicsContextPdf.dash_cmd>), (('_rgb',), <function GraphicsContextPdf.rgb_cmd>), (('_hatch', '_hatch_color'), <function GraphicsContextPdf.hatch_cmd>))

   copy_properties(other)[source]
 
Copy properties of other into self. 
   dash_cmd(dashes)[source]

   delta(other)[source]
 
Copy properties of other into self and return PDF commands needed to transform self into other. 
   fill(*args)[source]
 
Predicate: does the path need to be filled? An optional argument can be used to specify an alternative _fillcolor, as needed by RendererPdf.draw_markers. 
   fillcolor_cmd(rgb)[source]

   finalize()[source]
 
Make sure every pushed graphics state is popped. 
   hatch_cmd(hatch, hatch_color)[source]

   joinstyle_cmd(style)[source]

   joinstyles={'bevel': 2, 'miter': 0, 'round': 1}

   linewidth_cmd(width)[source]

   paint()[source]
 
Return the appropriate pdf operator to cause the path to be stroked, filled, or both. 
   pop()[source]

   push()[source]

   rgb_cmd(rgb)[source]

   stroke()[source]
 
Predicate: does the path need to be stroked (its outline drawn)? This tests for the various conditions that disable stroking the path, in which case it would presumably be filled.
capstyles={'butt': 0, 'projecting': 2, 'round': 1}
clip_cmd(cliprect, clippath)[source]
 
Set clip rectangle. Calls pop() and push().
commands=((('_cliprect', '_clippath'), <function GraphicsContextPdf.clip_cmd>), (('_alpha', '_forced_alpha', '_effective_alphas'), <function GraphicsContextPdf.alpha_cmd>), (('_capstyle',), <function GraphicsContextPdf.capstyle_cmd>), (('_fillcolor',), <function GraphicsContextPdf.fillcolor_cmd>), (('_joinstyle',), <function GraphicsContextPdf.joinstyle_cmd>), (('_linewidth',), <function GraphicsContextPdf.linewidth_cmd>), (('_dashes',), <function GraphicsContextPdf.dash_cmd>), (('_rgb',), <function GraphicsContextPdf.rgb_cmd>), (('_hatch', '_hatch_color'), <function GraphicsContextPdf.hatch_cmd>))
delta(other)[source]
 
Copy properties of other into self and return PDF commands needed to transform self into other.
fill(*args)[source]
 
Predicate: does the path need to be filled? An optional argument can be used to specify an alternative _fillcolor, as needed by RendererPdf.draw_markers.
joinstyles={'bevel': 2, 'miter': 0, 'round': 1}
paint()[source]
 
Return the appropriate pdf operator to cause the path to be stroked, filled, or both.
stroke()[source]
 
Predicate: does the path need to be stroked (its outline drawn)? This tests for the various conditions that disable stroking the path, in which case it would presumably be filled.
classmatplotlib.backends.backend_pdf.Name(name)[source]
 
Bases: object PDF name object.   statichexify(match)[source]

   name

   pdfRepr()[source]
classmatplotlib.backends.backend_pdf.Op(value)[source]
 
Bases: matplotlib.backends.backend_pdf.Operator, enum.Enum An enumeration.   begin_text=(b'BT',)[source]

   clip=b'W'[source]

   close_fill_stroke=b'b'[source]

   close_stroke=b's'[source]

   closepath=(b'h',)[source]

   concat_matrix=b'cm'[source]

   curveto=b'c'[source]

   end_text=b'ET'[source]

   endpath=b'n'[source]

   fill=b'f'[source]

   fill_stroke=b'B'[source]

   grestore=b'Q'[source]

   gsave=(b'q',)[source]

   lineto=b'l'[source]

   moveto=(b'm',)[source]

   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.     
   rectangle=b're'[source]

   selectfont=b'Tf'[source]

   setcolor_nonstroke=b'scn'[source]

   setcolor_stroke=b'SCN'[source]

   setcolorspace_nonstroke=(b'cs',)[source]

   setcolorspace_stroke=b'CS'[source]

   setdash=(b'd',)[source]

   setgray_nonstroke=b'g'[source]

   setgray_stroke=(b'G',)[source]

   setgstate=b'gs'[source]

   setlinecap=b'J'[source]

   setlinejoin=b'j'[source]

   setlinewidth=b'w'[source]

   setrgb_nonstroke=(b'rg',)[source]

   setrgb_stroke=b'RG'[source]

   shading=b'sh'[source]

   show=b'Tj'[source]

   showkern=b'TJ'[source]

   stroke=b'S'[source]

   textmatrix=(b'Tm',)[source]

   textpos=b'Td'[source]

   use_xobject=b'Do'[source]
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.
classmatplotlib.backends.backend_pdf.Operator(op)[source]
 
Bases: object PDF operator object.   op

   pdfRepr()[source]
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.
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.
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.
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.
newTextnote(text, positionRect=[- 100, - 100, 0, 0])[source]
staticpathOperations(path, transform, clip=None, simplify=None, sketch=None)[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.