neulab/docprompting-conala huggingface dataset:
classmatplotlib.image.FigureImage(fig, cmap=None, norm=None, offsetx=0, offsety=0, origin=None, **kwargs)[source]
 
Bases: matplotlib.image._ImageBase An image attached to a figure. cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 kwargs are an optional list of Artist keyword args   get_extent()[source]
 
Return the image extent as tuple (left, right, bottom, top). 
   make_image(renderer, magnification=1.0, unsampled=False)[source]
 
Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead.  Returns 
 
image(M, N, 4) uint8 array


The RGBA image, resampled unless unsampled is True.  
x, yfloat


The upper left corner where the image should be drawn, in pixel space.  
transAffine2D


The affine transformation from image to pixel space.     
   set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array array-like  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap Colormap or str or None  
data unknown  
figure Figure  
filternorm bool  
filterrad positive float  
gid str  
in_layout bool  
interpolation {'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm Normalize or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float   
   set_data(A)[source]
 
Set the image array. 
   zorder=0
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array array-like  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap Colormap or str or None  
data unknown  
figure Figure  
filternorm bool  
filterrad positive float  
gid str  
in_layout bool  
interpolation {'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm Normalize or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
matplotlib.image.imread(fname, format=None)[source]
 
Read an image from a file into an array.  Note This function exists for historical reasons. It is recommended to use PIL.Image.open instead for loading images.   Parameters 
 
fnamestr or file-like


The image file to read: a filename, a URL or a file-like object opened in read-binary mode. Passing a URL is deprecated. Please open the URL for reading and pass the result to Pillow, e.g. with np.array(PIL.Image.open(urllib.request.urlopen(url))).  
formatstr, optional


The image file format assumed for reading the data. The image is loaded as a PNG file if format is set to "png", if fname is a path or opened file with a ".png" extension, or if it is an URL. In all other cases, format is ignored and the format is auto-detected by PIL.Image.open.    Returns 
 numpy.array

The image data. The returned array has shape  (M, N) for grayscale images. (M, N, 3) for RGB images. (M, N, 4) for RGBA images.  PNG images are returned as float arrays (0-1). All other formats are returned as int arrays, with a bit depth determined by the file's contents.
matplotlib.image.imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None, origin=None, dpi=100, *, metadata=None, pil_kwargs=None)[source]
 
Save an array as an image file.  Parameters 
 
fnamestr or path-like or file-like


A path or a file-like object to store the image in. If format is not set, then the output format is inferred from the extension of fname, if any, and from rcParams["savefig.format"] (default: 'png') otherwise. If format is set, it determines the output format.  
arrarray-like


The image data. The shape can be one of MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA).  
vmin, vmaxfloat, optional


vmin and vmax set the color scaling for the image by fixing the values that map to the colormap color limits. If either vmin or vmax is None, that limit is determined from the arr min/max value.  
cmapstr or Colormap, default: rcParams["image.cmap"] (default: 'viridis')


A Colormap instance or registered colormap name. The colormap maps scalar data to colors. It is ignored for RGB(A) data.  
formatstr, optional


The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this is unset is documented under fname.  
origin{'upper', 'lower'}, default: rcParams["image.origin"] (default: 'upper')


Indicates whether the (0, 0) index of the array is in the upper left or lower left corner of the axes.  
dpifloat


The DPI to store in the metadata of the file. This does not affect the resolution of the output image. Depending on file format, this may be rounded to the nearest integer.  
metadatadict, optional


Metadata in the image file. The supported keys depend on the output format, see the documentation of the respective backends for more information.  
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.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array unknown  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap unknown  
data unknown  
extent 4-tuple of float  
figure Figure  
filternorm unknown  
filterrad unknown  
gid str  
in_layout bool  
interpolation {'nearest', 'bilinear'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm unknown  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
set_array(*args)[source]
 
Retained for backwards compatibility - use set_data instead.  Parameters 
 
Aarray-like
set_data(x, y, A)[source]
 
Set the grid for the pixel centers, and the pixel values.  Parameters 
 
x, y1D array-like


Monotonic arrays of shapes (N,) and (M,), respectively, specifying pixel centers.  
Aarray-like


(M, N) ndarray or masked array of values to be colormapped, or (M, N, 3) RGB array, or (M, N, 4) RGBA array.
set_filternorm(s)[source]
 
Set whether the resize filter normalizes the weights. See help for imshow.  Parameters 
 
filternormbool
set_filterrad(s)[source]
 
Set the resize filter radius only applicable to some interpolation schemes -- see help for imshow  Parameters 
 
filterradpositive float
set_interpolation(s)[source]
 
 Parameters 
 
s{'nearest', 'bilinear'} or None


If None, use rcParams["image.interpolation"] (default: 'antialiased').
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array unknown  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap Colormap or str or None  
data unknown  
extent 4-tuple of float  
figure Figure  
filternorm bool  
filterrad positive float  
gid str  
in_layout bool  
interpolation {'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm Normalize or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
set_data(x, y, A)[source]
 
Set the grid for the rectangle boundaries, and the data values.  Parameters 
 
x, y1D array-like, optional


Monotonic arrays of length N+1 and M+1, respectively, specifying rectangle boundaries. If not given, will default to range(N + 1) and range(M + 1), respectively.  
Aarray-like


The data to be color-coded. The interpretation depends on the shape:  (M, N) ndarray or masked array: values to be colormapped (M, N, 3): RGB array (M, N, 4): RGBA array
matplotlib.image.pil_to_array(pilImage)[source]
 
Load a PIL image and return it as a numpy int array.  Returns 
 numpy.array

The array shape depends on the image type:  (M, N) for grayscale images. (M, N, 3) for RGB images. (M, N, 4) for RGBA images.
matplotlib.image.thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear', preview=False)[source]
 
Make a thumbnail of image in infile with output filename thumbfile. See Image Thumbnail.  Parameters 
 
infilestr or file-like


The image file. Matplotlib relies on Pillow for image reading, and thus supports a wide range of file formats, including PNG, JPG, TIFF and others.  
thumbfilestr or file-like


The thumbnail filename.  
scalefloat, default: 0.1


The scale factor for the thumbnail.  
interpolationstr, default: 'bilinear'


The interpolation scheme used in the resampling. See the interpolation parameter of imshow for possible values.  
previewbool, default: False


If True, the default backend (presumably a user interface backend) will be used which will cause a figure to be raised if show is called. If it is False, the figure is created using FigureCanvasBase and the drawing backend is selected as Figure.savefig would normally do.    Returns 
 Figure

The figure instance containing the thumbnail.
matplotlib.interactive(b)[source]
 
Set whether to redraw after every plotting command (e.g. pyplot.xlabel).
matplotlib.is_interactive()[source]
 
Return whether to redraw after every plotting command.  Note This function is only intended for use in backends. End users should use pyplot.isinteractive instead.
classmatplotlib.legend.DraggableLegend(legend, use_blit=False, update='loc')[source]
 
Bases: matplotlib.offsetbox.DraggableOffsetBox Wrapper around a Legend to support mouse dragging.  Parameters 
 
legendLegend


The Legend instance to wrap.  
use_blitbool, optional


Use blitting for faster image composition. For details see FuncAnimation.  
update{'loc', 'bbox'}, optional


If "loc", update the loc parameter of the legend upon finalizing. If "bbox", update the bbox_to_anchor parameter.       finalize_offset()[source]
codes={'best': 0, 'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, 'upper right': 1}
contains(event)[source]
 
Test whether the artist contains the mouse event.  Parameters 
 
mouseeventmatplotlib.backend_bases.MouseEvent

  Returns 
 
containsbool


Whether any values are within the radius.  
detailsdict


An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details.
draw_frame(b)[source]
 
Set whether the legend box patch is drawn.  Parameters 
 
bbool
get_bbox_to_anchor()[source]
 
Return the bbox that the legend will be anchored to.
classmethodget_default_handler_map()[source]
 
A class method that returns the default handler map.
get_draggable()[source]
 
Return True if the legend is draggable, False otherwise.
staticget_legend_handler(legend_handler_map, orig_handle)[source]
 
Return a legend handler from legend_handler_map that corresponds to orig_handler. legend_handler_map should be a dictionary object (that is returned by the get_legend_handler_map method). It first checks if the orig_handle itself is a key in the legend_handler_map and return the associated value. Otherwise, it checks for each of the classes in its method-resolution-order. If no matching key is found, it returns None.
get_lines()[source]
 
Return the list of Line2Ds in the legend.
get_patches()[source]
 
Return the list of Patchs in the legend.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, draggable=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha scalar or None  
animated bool  
bbox_to_anchor BboxBase or tuple  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
draggable bool  
figure Figure  
frame_on bool  
gid str  
in_layout bool  
label object  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
title unknown  
transform Transform  
url str  
visible bool  
zorder float
set_bbox_to_anchor(bbox, transform=None)[source]
 
Set the bbox that the legend will be anchored to.  Parameters 
 
bboxBboxBase or tuple


The bounding box can be specified in the following ways:  A BboxBase instance A tuple of (left, bottom, width, height) in the given transform (normalized axes coordinate if None) A tuple of (left, bottom) where the width and height will be assumed to be zero. 
None, to remove the bbox anchoring, and use the parent bbox.   
transformTransform, optional


A transform to apply to the bounding box. If not specified, this will use a transform to the bounding box of the parent.
classmethodset_default_handler_map(handler_map)[source]
 
A class method to set the default handler map.
set_draggable(state, use_blit=False, update='loc')[source]
 
Enable or disable mouse dragging support of the legend.  Parameters 
 
statebool


Whether mouse dragging is enabled.  
use_blitbool, optional


Use blitting for faster image composition. For details see FuncAnimation.  
update{'loc', 'bbox'}, optional


The legend parameter to be changed when dragged:  'loc': update the loc parameter of the legend 'bbox': update the bbox_to_anchor parameter of the legend     Returns 
 
DraggableLegend or None


If state is True this returns the DraggableLegend helper instance. Otherwise this returns None.
set_frame_on(b)[source]
 
Set whether the legend box patch is drawn.  Parameters 
 
bbool
set_title(title, prop=None)[source]
 
Set the legend title. Fontproperties can be optionally set with prop parameter.
classmethodupdate_default_handler_map(handler_map)[source]
 
A class method to update the default handler map.
classmatplotlib.legend_handler.HandlerBase(xpad=0.0, ypad=0.0, update_func=None)[source]
 
A Base class for default legend handlers. The derived classes are meant to override create_artists method, which has a following signature.: def create_artists(self, legend, orig_handle,
                   xdescent, ydescent, width, height, fontsize,
                   trans):
 The overridden method needs to create artists of the given transform that fits in the given dimension (xdescent, ydescent, width, height) that are scaled by fontsize if necessary.   adjust_drawing_area(legend, orig_handle, xdescent, ydescent, width, height, fontsize)[source]

   create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]

   legend_artist(legend, orig_handle, fontsize, handlebox)[source]
 
Return the artist that this HandlerBase generates for the given original artist/handle.  Parameters 
 
legendLegend


The legend for which these legend artists are being created.  
orig_handlematplotlib.artist.Artist or similar


The object for which these legend artists are being created.  
fontsizeint


The fontsize in pixels. The artists being created should be scaled according to the given fontsize.  
handleboxmatplotlib.offsetbox.OffsetBox


The box which has been created to hold this legend entry's artists. Artists created in the legend_artist method must be added to this handlebox inside this method.     
   update_prop(legend_handle, orig_handle, legend)[source]
adjust_drawing_area(legend, orig_handle, xdescent, ydescent, width, height, fontsize)[source]
create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]
legend_artist(legend, orig_handle, fontsize, handlebox)[source]
 
Return the artist that this HandlerBase generates for the given original artist/handle.  Parameters 
 
legendLegend


The legend for which these legend artists are being created.  
orig_handlematplotlib.artist.Artist or similar


The object for which these legend artists are being created.  
fontsizeint


The fontsize in pixels. The artists being created should be scaled according to the given fontsize.  
handleboxmatplotlib.offsetbox.OffsetBox


The box which has been created to hold this legend entry's artists. Artists created in the legend_artist method must be added to this handlebox inside this method.
classmatplotlib.legend_handler.HandlerCircleCollection(yoffsets=None, sizes=None, **kwargs)[source]
 
Handler for CircleCollections.  Parameters 
 
numpointsint


Number of points to show in legend entry.  
yoffsetsarray of floats


Length numpoints list of y offsets for each point in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       create_collection(orig_handle, sizes, offsets, transOffset)[source]
classmatplotlib.legend_handler.HandlerErrorbar(xerr_size=0.5, yerr_size=None, marker_pad=0.3, numpoints=None, **kwargs)[source]
 
Handler for Errorbars.  Parameters 
 
marker_padfloat


Padding between points in legend entry.  
numpointsint


Number of points to show in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]

   get_err_size(legend, xdescent, ydescent, width, height, fontsize)[source]
get_err_size(legend, xdescent, ydescent, width, height, fontsize)[source]
classmatplotlib.legend_handler.HandlerLine2D(marker_pad=0.3, numpoints=None, **kw)[source]
 
Handler for Line2D instances.  See also  HandlerLine2DCompound

An earlier handler implementation, which used one artist for the line and another for the marker(s).     Parameters 
 
marker_padfloat


Padding between points in legend entry.  
numpointsint


Number of points to show in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]
classmatplotlib.legend_handler.HandlerLine2DCompound(marker_pad=0.3, numpoints=None, **kwargs)[source]
 
Original handler for Line2D instances, that relies on combining a line-only with a marker-only artist. May be deprecated in the future.  Parameters 
 
marker_padfloat


Padding between points in legend entry.  
numpointsint


Number of points to show in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]
classmatplotlib.legend_handler.HandlerLineCollection(marker_pad=0.3, numpoints=None, **kw)[source]
 
Handler for LineCollection instances.  Parameters 
 
marker_padfloat


Padding between points in legend entry.  
numpointsint


Number of points to show in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]

   get_numpoints(legend)[source]
classmatplotlib.legend_handler.HandlerNpoints(marker_pad=0.3, numpoints=None, **kwargs)[source]
 
A legend handler that shows numpoints points in the legend entry.  Parameters 
 
marker_padfloat


Padding between points in legend entry.  
numpointsint


Number of points to show in legend entry.  **kwargs

Keyword arguments forwarded to HandlerBase.       get_numpoints(legend)[source]

   get_xdata(legend, xdescent, ydescent, width, height, fontsize)[source]
get_xdata(legend, xdescent, ydescent, width, height, fontsize)[source]
classmatplotlib.legend_handler.HandlerNpointsYoffsets(numpoints=None, yoffsets=None, **kwargs)[source]
 
A legend handler that shows numpoints in the legend, and allows them to be individually offset in the y-direction.  Parameters 
 
numpointsint


Number of points to show in legend entry.  
yoffsetsarray of floats


Length numpoints list of y offsets for each point in legend entry.  **kwargs

Keyword arguments forwarded to HandlerNpoints.       get_ydata(legend, xdescent, ydescent, width, height, fontsize)[source]
get_ydata(legend, xdescent, ydescent, width, height, fontsize)[source]