neulab/docprompting-conala huggingface dataset:
matplotlib.pyplot.figimage   matplotlib.pyplot.figimage(X, xo=0, yo=0, alpha=None, norm=None, cmap=None, vmin=None, vmax=None, origin=None, resize=False, **kwargs)[source]
 
Add a non-resampled image to the figure. The image is attached to the lower or upper left corner depending on origin.  Parameters 
 X

The image data. This is an array of one of the following shapes:  MxN: luminance (grayscale) values MxNx3: RGB values MxNx4: RGBA values   
xo, yoint


The x/y image offset in pixels.  
alphaNone or float


The alpha blending value.  
normmatplotlib.colors.Normalize


A Normalize instance to map the luminance to the interval [0, 1].  
cmapstr or matplotlib.colors.Colormap, default: rcParams["image.cmap"] (default: 'viridis')


The colormap to use.  
vmin, vmaxfloat


If norm is not given, these values set the data limits for the colormap.  
origin{'upper', 'lower'}, default: rcParams["image.origin"] (default: 'upper')


Indicates where the [0, 0] index of the array is in the upper left or lower left corner of the axes.  
resizebool


If True, resize the figure to match the given image size.    Returns 
 matplotlib.image.FigureImage
  Other Parameters 
 **kwargs

Additional kwargs are Artist kwargs passed on to FigureImage.     Notes figimage complements the Axes image (imshow) which will be resampled to fit the current Axes. If you want a resampled image to fill the entire figure, you can define an Axes with extent [0, 0, 1, 1]. Examples f = plt.figure()
nx = int(f.get_figwidth() * f.dpi)
ny = int(f.get_figheight() * f.dpi)
data = np.random.random((ny, nx))
f.figimage(data)
plt.show()
matplotlib.pyplot.fignum_exists   matplotlib.pyplot.fignum_exists(num)[source]
 
Return whether the figure with the given id exists.
matplotlib.pyplot.figtext   matplotlib.pyplot.figtext(x, y, s, fontdict=None, **kwargs)[source]
 
Add text to figure.  Parameters 
 
x, yfloat


The position to place the text. By default, this is in figure coordinates, floats in [0, 1]. The coordinate system can be changed using the transform keyword.  
sstr


The text string.  
fontdictdict, optional


A dictionary to override the default text properties. If not given, the defaults are determined by rcParams["font.*"]. Properties passed as kwargs override the corresponding ones given in fontdict.    Returns 
 Text
  Other Parameters 
 
**kwargsText properties


Other miscellaneous text parameters.   
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  
backgroundcolor color  
bbox dict with properties for patches.FancyBboxPatch  
clip_box unknown  
clip_on unknown  
clip_path unknown  
color or c color  
figure Figure  
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}  
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path  
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}  
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}  
fontstyle or style {'normal', 'italic', 'oblique'}  
fontvariant or variant {'normal', 'small-caps'}  
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}  
gid str  
horizontalalignment or ha {'center', 'right', 'left'}  
in_layout bool  
label object  
linespacing float (multiple of font size)  
math_fontfamily str  
multialignment or ma {'left', 'right', 'center'}  
parse_math bool  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
position (float, float)  
rasterized bool  
rotation float or {'vertical', 'horizontal'}  
rotation_mode {None, 'default', 'anchor'}  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
text object  
transform Transform  
transform_rotates_text bool  
url str  
usetex bool or None  
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}  
visible bool  
wrap bool  
x float  
y float  
zorder float        See also  Axes.text
pyplot.text
  
  Examples using matplotlib.pyplot.figtext
 
   Fonts demo (object-oriented style)   

   Fonts demo (keyword arguments)
matplotlib.pyplot.fill   matplotlib.pyplot.fill(*args, data=None, **kwargs)[source]
 
Plot filled polygons.  Parameters 
 
*argssequence of x, y, [color]


Each polygon is defined by the lists of x and y positions of its nodes, optionally followed by a color specifier. See matplotlib.colors for supported color specifiers. The standard color cycle is used for polygons without a color specifier. You can plot multiple polygons by providing multiple x, y, [color] groups. For example, each of the following is legal: ax.fill(x, y)                    # a polygon with default color
ax.fill(x, y, "b")               # a blue polygon
ax.fill(x, y, x2, y2)            # two polygons
ax.fill(x, y, "b", x2, y2, "r")  # a blue and a red polygon
  
dataindexable object, optional


An object with labelled data. If given, provide the label names to plot in x and y, e.g.: ax.fill("time", "signal",
        data={"time": [0, 1, 2], "signal": [0, 1, 0]})
    Returns 
 list of Polygon

  Other Parameters 
 
**kwargsPolygon properties

   Notes Use fill_between() if you would like to fill the region between two curves. 
  Examples using matplotlib.pyplot.fill
 
   Filled polygon   

   Interactive functions   

   Fill Spiral
matplotlib.pyplot.findobj   matplotlib.pyplot.findobj(o=None, match=None, include_self=True)[source]
 
Find artist objects. Recursively find all Artist instances contained in the artist.  Parameters 
 match

A filter criterion for the matches. This can be  
None: Return all objects contained in artist. A function with signature def match(artist: Artist) -> bool. The result will only contain artists for which the function returns True. A class instance: e.g., Line2D. The result will only contain artists of this class or its subclasses (isinstance check).   
include_selfbool


Include self in the list to be checked for a match.    Returns 
 list of Artist
matplotlib.pyplot.flag   matplotlib.pyplot.flag()[source]
 
Set the colormap to 'flag'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.
matplotlib.pyplot.gca   matplotlib.pyplot.gca(**kwargs)[source]
 
Get the current Axes. If there is currently no Axes on this Figure, a new one is created using Figure.add_subplot. (To test whether there is currently an Axes on a Figure, check whether figure.axes is empty. To test whether there is currently a Figure on the pyplot figure stack, check whether pyplot.get_fignums() is empty.) The following kwargs are supported for ensuring the returned Axes adheres to the given projection etc., and for Axes creation if the active Axes does not exist:   
Property Description   
adjustable {'box', 'datalim'}  
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  
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}  
animated bool  
aspect {'auto', 'equal'} or float  
autoscale_on bool  
autoscalex_on bool  
autoscaley_on bool  
axes_locator Callable[[Axes, Renderer], Bbox]  
axisbelow bool or 'line'  
box_aspect float or None  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
facecolor or fc color  
figure Figure  
frame_on bool  
gid str  
in_layout bool  
label object  
navigate bool  
navigate_mode unknown  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
position [left, bottom, width, height] or Bbox  
prop_cycle unknown  
rasterization_zorder float or None  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
title str  
transform Transform  
url str  
visible bool  
xbound unknown  
xlabel str  
xlim (bottom: float, top: float)  
xmargin float greater than -0.5  
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase  
xticklabels unknown  
xticks unknown  
ybound unknown  
ylabel str  
ylim (bottom: float, top: float)  
ymargin float greater than -0.5  
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase  
yticklabels unknown  
yticks unknown  
zorder float   
  Examples using matplotlib.pyplot.gca
 
   Creating annotated heatmaps   

   Managing multiple figures in pyplot   

   Scale invariant angle label   

   Rainbow text   

   Infinite lines   

   Set and get properties   

   Hinton diagrams   

   Tight Layout guide
matplotlib.pyplot.gcf   matplotlib.pyplot.gcf()[source]
 
Get the current figure. If there is currently no figure on the pyplot figure stack, a new one is created using figure(). (To test whether there is currently a figure on the pyplot figure stack, check whether get_fignums() is empty.)
matplotlib.pyplot.gci   matplotlib.pyplot.gci()[source]
 
Get the current colorable artist. Specifically, returns the current ScalarMappable instance (Image created by imshow or figimage, Collection created by pcolor or scatter, etc.), or None if no such instance has been defined. The current image is an attribute of the current Axes, or the nearest earlier Axes in the current figure that contains an image. Notes Historically, the only colorable artists were images; hence the name gci (get current image).
matplotlib.pyplot.get   matplotlib.pyplot.get(obj, *args, **kwargs)[source]
 
Return the value of an Artist's property, or print all of them.  Parameters 
 
objArtist


The queried artist; e.g., a Line2D, a Text, or an Axes.  
propertystr or None, default: None


If property is 'somename', this function returns obj.get_somename(). If it's None (or unset), it prints all gettable properties from obj. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: property or alias = value e.g.: linewidth or lw = 2      See also  setp
matplotlib.pyplot.get_current_fig_manager   matplotlib.pyplot.get_current_fig_manager()[source]
 
Return the figure manager of the current figure. The figure manager is a container for the actual backend-depended window that displays the figure on screen. If no current figure exists, a new one is created, and its figure manager is returned.  Returns 
 
FigureManagerBase or backend-dependent subclass thereof
matplotlib.pyplot.get_figlabels   matplotlib.pyplot.get_figlabels()[source]
 
Return a list of existing figure labels.
matplotlib.pyplot.get_fignums   matplotlib.pyplot.get_fignums()[source]
 
Return a list of existing figure numbers.
matplotlib.pyplot.get_plot_commands   matplotlib.pyplot.get_plot_commands()[source]
 
Get a sorted list of all of the plotting commands.
matplotlib.pyplot.getp   matplotlib.pyplot.getp(obj, *args, **kwargs)[source]
 
Return the value of an Artist's property, or print all of them.  Parameters 
 
objArtist


The queried artist; e.g., a Line2D, a Text, or an Axes.  
propertystr or None, default: None


If property is 'somename', this function returns obj.get_somename(). If it's None (or unset), it prints all gettable properties from obj. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: property or alias = value e.g.: linewidth or lw = 2      See also  setp
  
  Examples using matplotlib.pyplot.getp
 
   Set and get properties   

   Artist tutorial
matplotlib.pyplot.ginput   matplotlib.pyplot.ginput(n=1, timeout=30, show_clicks=True, mouse_add=MouseButton.LEFT, mouse_pop=MouseButton.RIGHT, mouse_stop=MouseButton.MIDDLE)[source]
 
Blocking call to interact with a figure. Wait until the user clicks n times on the figure, and return the coordinates of each click in a list. There are three possible interactions:  Add a point. Remove the most recently added point. Stop the interaction and return the points added so far.  The actions are assigned to mouse buttons via the arguments mouse_add, mouse_pop and mouse_stop.  Parameters 
 
nint, default: 1


Number of mouse clicks to accumulate. If negative, accumulate clicks until the input is terminated manually.  
timeoutfloat, default: 30 seconds


Number of seconds to wait before timing out. If zero or negative will never timeout.  
show_clicksbool, default: True


If True, show a red cross at the location of each click.  
mouse_addMouseButton or None, default: MouseButton.LEFT


Mouse button used to add points.  
mouse_popMouseButton or None, default: MouseButton.RIGHT


Mouse button used to remove the most recently added point.  
mouse_stopMouseButton or None, default: MouseButton.MIDDLE


Mouse button used to stop input.    Returns 
 list of tuples

A list of the clicked (x, y) coordinates.     Notes The keyboard can also be used to select points in case your mouse does not have one or more of the buttons. The delete and backspace keys act like right clicking (i.e., remove last point), the enter key terminates input and any other key (not already used by the window manager) selects a point. 
  Examples using matplotlib.pyplot.ginput
 
   Interactive functions
matplotlib.pyplot.gray   matplotlib.pyplot.gray()[source]
 
Set the colormap to 'gray'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.
matplotlib.pyplot.grid   matplotlib.pyplot.grid(visible=None, which='major', axis='both', **kwargs)[source]
 
Configure the grid lines.  Parameters 
 
visiblebool or None, optional


Whether to show the grid lines. If any kwargs are supplied, it is assumed you want the grid on and visible will be set to True. If visible is None and there are no kwargs, this toggles the visibility of the lines.  
which{'major', 'minor', 'both'}, optional


The grid lines to apply the changes on.  
axis{'both', 'x', 'y'}, optional


The axis to apply the changes on.  
**kwargsLine2D properties


Define the line properties of the grid, e.g.: grid(color='r', linestyle='-', linewidth=2)
 Valid keyword arguments 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  
antialiased or aa bool  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
color or c color  
dash_capstyle CapStyle or {'butt', 'projecting', 'round'}  
dash_joinstyle JoinStyle or {'miter', 'round', 'bevel'}  
dashes sequence of floats (on/off ink in points) or (None, None)  
data (2, N) array or two 1D arrays  
drawstyle or ds {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default'  
figure Figure  
fillstyle {'full', 'left', 'right', 'bottom', 'top', 'none'}  
gid str  
in_layout bool  
label object  
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}  
linewidth or lw float  
marker marker style string, Path or MarkerStyle  
markeredgecolor or mec color  
markeredgewidth or mew float  
markerfacecolor or mfc color  
markerfacecoloralt or mfcalt color  
markersize or ms float  
markevery None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool]  
path_effects AbstractPathEffect  
picker float or callable[[Artist, Event], tuple[bool, dict]]  
pickradius float  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
solid_capstyle CapStyle or {'butt', 'projecting', 'round'}  
solid_joinstyle JoinStyle or {'miter', 'round', 'bevel'}  
transform unknown  
url str  
visible bool  
xdata 1D array  
ydata 1D array  
zorder float       Notes The axis is drawn as a unit, so the effective zorder for drawing the grid is determined by the zorder of each axis, not by the zorder of the Line2D objects comprising the grid. Therefore, to set grid zorder, use set_axisbelow or, for more control, call the set_zorder method of each axis. 
  Examples using matplotlib.pyplot.grid
 
   Step Demo   

   Geographic Projections   

   Pyplot Text   

   Customize Rc   

   Findobj Demo   

   Custom scale   

   SkewT-logP diagram: using transforms and custom projections   

   Pyplot tutorial
matplotlib.pyplot.hist2d   matplotlib.pyplot.hist2d(x, y, bins=10, range=None, density=False, weights=None, cmin=None, cmax=None, *, data=None, **kwargs)[source]
 
Make a 2D histogram plot.  Parameters 
 
x, yarray-like, shape (n, )


Input values  
binsNone or int or [int, int] or array-like or [array, array]


The bin specification:  If int, the number of bins for the two dimensions (nx=ny=bins). If [int, int], the number of bins in each dimension (nx, ny = bins). If array-like, the bin edges for the two dimensions (x_edges=y_edges=bins). If [array, array], the bin edges in each dimension (x_edges, y_edges = bins).  The default value is 10.  
rangearray-like shape(2, 2), optional


The leftmost and rightmost edges of the bins along each dimension (if not specified explicitly in the bins parameters): [[xmin,
xmax], [ymin, ymax]]. All values outside of this range will be considered outliers and not tallied in the histogram.  
densitybool, default: False


Normalize histogram. See the documentation for the density parameter of hist for more details.  
weightsarray-like, shape (n, ), optional


An array of values w_i weighing each sample (x_i, y_i).  
cmin, cmaxfloat, default: None


All bins that has count less than cmin or more than cmax will not be displayed (set to NaN before passing to imshow) and these count values in the return value count histogram will also be set to nan upon return.    Returns 
 
h2D array


The bi-dimensional histogram of samples x and y. Values in x are histogrammed along the first dimension and values in y are histogrammed along the second dimension.  
xedges1D array


The bin edges along the x axis.  
yedges1D array


The bin edges along the y axis.  
imageQuadMesh

  Other Parameters 
 
cmapColormap or str, optional


A colors.Colormap instance. If not set, use rc settings.  
normNormalize, optional


A colors.Normalize instance is used to scale luminance data to [0, 1]. If not set, defaults to colors.Normalize().  
vmin/vmaxNone or scalar, optional


Arguments passed to the Normalize instance.  
alpha0 <= scalar <= 1 or None, optional


The alpha blending value.  
dataindexable object, optional


If given, the following parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception): x, y, weights  **kwargs

Additional parameters are passed along to the pcolormesh method and QuadMesh constructor.      See also  hist

1D histogram plotting  hexbin

2D histogram with hexagonal bins    Notes  Currently hist2d calculates its own axis limits, and any limits previously set are ignored. Rendering the histogram with a logarithmic color scale is accomplished by passing a colors.LogNorm instance to the norm keyword argument. Likewise, power-law normalization (similar in effect to gamma correction) can be accomplished with colors.PowerNorm.
matplotlib.pyplot.hlines   matplotlib.pyplot.hlines(y, xmin, xmax, colors=None, linestyles='solid', label='', *, data=None, **kwargs)[source]
 
Plot horizontal lines at each y from xmin to xmax.  Parameters 
 
yfloat or array-like


y-indexes where to plot the lines.  
xmin, xmaxfloat or array-like


Respective beginning and end of each line. If scalars are provided, all lines will have same length.  
colorslist of colors, default: rcParams["lines.color"] (default: 'C0')


linestyles{'solid', 'dashed', 'dashdot', 'dotted'}, optional


labelstr, default: ''

  Returns 
 LineCollection
  Other Parameters 
 
dataindexable object, optional


If given, the following parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception): y, xmin, xmax, colors  
**kwargsLineCollection properties.

    See also  vlines

vertical lines  axhline

horizontal line across the Axes
matplotlib.pyplot.hot   matplotlib.pyplot.hot()[source]
 
Set the colormap to 'hot'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.
matplotlib.pyplot.hsv   matplotlib.pyplot.hsv()[source]
 
Set the colormap to 'hsv'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.
matplotlib.pyplot.imread   matplotlib.pyplot.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.     
  Examples using matplotlib.pyplot.imread
 
   Clipping images with patches   

   Image Demo   

   AnnotationBbox demo   

   Using a text as a Path   

   Convert texts to images   

   Ribbon Box
matplotlib.pyplot.imsave   matplotlib.pyplot.imsave(fname, arr, **kwargs)[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.
matplotlib.pyplot.inferno   matplotlib.pyplot.inferno()[source]
 
Set the colormap to 'inferno'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.
matplotlib.pyplot.install_repl_displayhook   matplotlib.pyplot.install_repl_displayhook()[source]
 
Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl. This works both with IPython and with vanilla python shells.