neulab/docprompting-conala huggingface dataset:
convert_mesh_to_triangles(meshWidth, meshHeight, coordinates)[source]
 
[Deprecated] Notes  Deprecated since version 3.5:
get_coordinates()[source]
 
Return the vertices of the mesh as an (M+1, N+1, 2) array. M, N are the number of quadrilaterals in the rows / columns of the mesh, corresponding to (M+1, N+1) vertices. The last dimension specifies the components (x, y).
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<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 array-like or scalar or None  
animated bool  
antialiased or aa or antialiaseds bool or list of bools  
array (M, N) array-like or M*N array-like  
capstyle CapStyle or {'butt', 'projecting', 'round'}  
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  
color color or list of rgba tuples  
edgecolor or ec or edgecolors color or list of colors or 'face'  
facecolor or facecolors or fc color or list of colors  
figure Figure  
gid str  
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}  
in_layout bool  
joinstyle JoinStyle or {'miter', 'round', 'bevel'}  
label object  
linestyle or dashes or linestyles or ls str or tuple or list thereof  
linewidth or linewidths or lw float or list of floats  
norm Normalize or None  
offset_transform Transform  
offsets (N, 2) or (2,) array-like  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
pickradius float  
rasterized bool  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
urls list of str or None  
visible bool  
zorder float
set_array(A)[source]
 
Set the data values.  Parameters 
 
A(M, N) array-like or M*N array-like


If the values are provided as a 2D grid, the shape must match the coordinates grid. If the values are 1D, they are reshaped to 2D. M, N follow from the coordinates grid, where the coordinates grid shape is (M, N) for 'gouraud' shading and (M+1, N+1) for 'flat' shading.
staticconvert_mesh_to_paths(tri)[source]
 
Convert a given mesh into a sequence of Path objects. This function is primarily of use to implementers of backends that do not directly support meshes.
add_lines(*args, **kwargs)[source]
 
Draw lines on the colorbar. The lines are appended to the list lines.  Parameters 
 
levelsarray-like


The positions of the lines.  
colorscolor or list of colors


Either a single color applying to all lines or one color value for each line.  
linewidthsfloat or array-like


Either a single linewidth applying to all lines or one linewidth for each line.  
erasebool, default: True


Whether to remove any previously added lines.     Notes Alternatively, this method can also be called with the signature colorbar.add_lines(contour_set, erase=True), in which case levels, colors, and linewidths are taken from contour_set.
draw_all()[source]
 
Calculate any free parameters based on the current cmap and norm, and do all the drawing.
get_ticks(minor=False)[source]
 
Return the ticks as a list of locations.  Parameters 
 
minorboolean, default: False


if True return the minor ticks.
minorticks_off()[source]
 
Turn the minor ticks of the colorbar off.
remove()[source]
 
Remove this colorbar from the figure. If the colorbar was created with use_gridspec=True the previous gridspec is restored.
set_alpha(alpha)[source]
 
Set the transparency between 0 (transparent) and 1 (opaque). If an array is provided, alpha will be set to None to use the transparency values associated with the colormap.
set_label(label, *, loc=None, **kwargs)[source]
 
Add a label to the long axis of the colorbar.  Parameters 
 
labelstr


The label text.  
locstr, optional


The location of the label.  For horizontal orientation one of {'left', 'center', 'right'} For vertical orientation one of {'bottom', 'center', 'top'}  Defaults to rcParams["xaxis.labellocation"] (default: 'center') or rcParams["yaxis.labellocation"] (default: 'center') depending on the orientation.  **kwargs

Keyword arguments are passed to set_xlabel / set_ylabel. Supported keywords are labelpad and Text properties.
set_ticklabels(ticklabels, update_ticks=<deprecated parameter>, *, minor=False, **kwargs)[source]
 
Set tick labels.  Discouraged The use of this method is discouraged, because of the dependency on tick positions. In most cases, you'll want to use set_ticks(positions, labels=labels) instead. If you are using this method, you should always fix the tick positions before, e.g. by using Colorbar.set_ticks or by explicitly setting a FixedLocator on the long axis of the colorbar. Otherwise, ticks are free to move and the labels may end up in unexpected positions.   Parameters 
 
ticklabelssequence of str or of Text


Texts for labeling each tick location in the sequence set by Colorbar.set_ticks; the number of labels must match the number of locations.  
update_ticksbool, default: True

 This keyword argument is ignored and will be be removed. Deprecated  minorbool


If True, set minor ticks instead of major ticks.    **kwargs

Text properties for the labels.
set_ticks(ticks, update_ticks=<deprecated parameter>, labels=None, *, minor=False, **kwargs)[source]
 
Set tick locations.  Parameters 
 
tickslist of floats


List of tick locations.  
labelslist of str, optional


List of tick labels. If not set, the labels show the data value.  
minorbool, default: False


If False, set the major ticks; if True, the minor ticks.  **kwargs

Text properties for the labels. These take effect only if you pass labels. In other cases, please use tick_params.
update_normal(mappable)[source]
 
Update solid patches, lines, etc. This is meant to be called when the norm of the image or contour plot to which this colorbar belongs changes. If the norm on the mappable is different than before, this resets the locator and formatter for the axis, so if these have been customized, they will need to be customized again. However, if the norm only changes values of vmin, vmax or cmap then the old formatter and locator will be preserved.
update_ticks()[source]
 
Setup the ticks and ticklabels. This should not be needed by users.
matplotlib.colorbar.colorbar_factory(cax, mappable, **kwargs)[source]
 
[Deprecated] Create a colorbar on the given axes for the given mappable.  Note This is a low-level function to turn an existing axes into a colorbar axes. Typically, you'll want to use colorbar instead, which automatically handles creation and placement of a suitable axes as well.   Parameters 
 
caxAxes


The Axes to turn into a colorbar.  
mappableScalarMappable


The mappable to be described by the colorbar.  **kwargs

Keyword arguments are passed to the respective colorbar class.    Returns 
 Colorbar

The created colorbar instance.     Notes  Deprecated since version 3.4.
matplotlib.colorbar.ColorbarBase[source]
 
alias of matplotlib.colorbar.Colorbar
classmatplotlib.colorbar.ColorbarPatch(ax, mappable=None, *, cmap=None, norm=None, alpha=None, values=None, boundaries=None, orientation='vertical', ticklocation='auto', extend=None, spacing='uniform', ticks=None, format=None, drawedges=False, filled=True, extendfrac=None, extendrect=False, label='')[source]
 
Bases: matplotlib.colorbar.Colorbar [Deprecated] Notes  Deprecated since version 3.4:
matplotlib.colorbar.make_axes(parents, location=None, orientation=None, fraction=0.15, shrink=1.0, aspect=20, **kw)[source]
 
Create an Axes suitable for a colorbar. The axes is placed in the figure of the parents axes, by resizing and repositioning parents.  Parameters 
 
parentsAxes or list of Axes


The Axes to use as parents for placing the colorbar.  
locationNone or {'left', 'right', 'top', 'bottom'}


The location, relative to the parent axes, where the colorbar axes is created. It also determines the orientation of the colorbar (colorbars on the left and right are vertical, colorbars at the top and bottom are horizontal). If None, the location will come from the orientation if it is set (vertical colorbars on the right, horizontal ones at the bottom), or default to 'right' if orientation is unset.  
orientationNone or {'vertical', 'horizontal'}


The orientation of the colorbar. It is preferable to set the location of the colorbar, as that also determines the orientation; passing incompatible values for location and orientation raises an exception.  
fractionfloat, default: 0.15


Fraction of original axes to use for colorbar.  
shrinkfloat, default: 1.0


Fraction by which to multiply the size of the colorbar.  
aspectfloat, default: 20


Ratio of long to short dimensions.    Returns 
 
caxAxes


The child axes.  
kwdict


The reduced keyword dictionary to be passed when creating the colorbar instance.    Other Parameters 
 
padfloat, default: 0.05 if vertical, 0.15 if horizontal


Fraction of original axes between colorbar and new image axes.  
anchor(float, float), optional


The anchor point of the colorbar axes. Defaults to (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal.  
panchor(float, float), or False, optional


The anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged. Defaults to (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal.
matplotlib.colorbar.make_axes_gridspec(parent, *, location=None, orientation=None, fraction=0.15, shrink=1.0, aspect=20, **kw)[source]
 
Create a SubplotBase suitable for a colorbar. The axes is placed in the figure of the parent axes, by resizing and repositioning parent. This function is similar to make_axes. Primary differences are  
make_axes_gridspec should only be used with a SubplotBase parent. 
make_axes creates an Axes; make_axes_gridspec creates a SubplotBase. 
make_axes updates the position of the parent. make_axes_gridspec replaces the grid_spec attribute of the parent with a new one.  While this function is meant to be compatible with make_axes, there could be some minor differences.  Parameters 
 
parentAxes


The Axes to use as parent for placing the colorbar.  
locationNone or {'left', 'right', 'top', 'bottom'}


The location, relative to the parent axes, where the colorbar axes is created. It also determines the orientation of the colorbar (colorbars on the left and right are vertical, colorbars at the top and bottom are horizontal). If None, the location will come from the orientation if it is set (vertical colorbars on the right, horizontal ones at the bottom), or default to 'right' if orientation is unset.  
orientationNone or {'vertical', 'horizontal'}


The orientation of the colorbar. It is preferable to set the location of the colorbar, as that also determines the orientation; passing incompatible values for location and orientation raises an exception.  
fractionfloat, default: 0.15


Fraction of original axes to use for colorbar.  
shrinkfloat, default: 1.0


Fraction by which to multiply the size of the colorbar.  
aspectfloat, default: 20


Ratio of long to short dimensions.    Returns 
 
caxSubplotBase


The child axes.  
kwdict


The reduced keyword dictionary to be passed when creating the colorbar instance.    Other Parameters 
 
padfloat, default: 0.05 if vertical, 0.15 if horizontal


Fraction of original axes between colorbar and new image axes.  
anchor(float, float), optional


The anchor point of the colorbar axes. Defaults to (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal.  
panchor(float, float), or False, optional


The anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged. Defaults to (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal.
matplotlib.colormaps[source]
 
Container for colormaps that are known to Matplotlib by name.  Experimental While we expect the API to be final, we formally mark it as experimental for 3.5 because we want to keep the option to still adapt the API for 3.6 should the need arise.  The universal registry instance is matplotlib.colormaps. There should be no need for users to instantiate ColormapRegistry themselves. Read access uses a dict-like interface mapping names to Colormaps: import matplotlib as mpl
cmap = mpl.colormaps['viridis']
 Returned Colormaps are copies, so that their modification does not change the global definition of the colormap. Additional colormaps can be added via ColormapRegistry.register: mpl.colormaps.register(my_colormap)
matplotlib.colors.BoundaryNorm   classmatplotlib.colors.BoundaryNorm(boundaries, ncolors, clip=False, *, extend='neither')[source]
 
Bases: matplotlib.colors.Normalize Generate a colormap index based on discrete intervals. Unlike Normalize or LogNorm, BoundaryNorm maps values to integers instead of to the interval 0-1. Mapping to the 0-1 interval could have been done via piece-wise linear interpolation, but using integers seems simpler, and reduces the number of conversions back and forth between integer and floating point.  Parameters 
 
boundariesarray-like


Monotonically increasing sequence of at least 2 boundaries.  
ncolorsint


Number of colors in the colormap to be used.  
clipbool, optional


If clip is True, out of range values are mapped to 0 if they are below boundaries[0] or mapped to ncolors - 1 if they are above boundaries[-1]. If clip is False, out of range values are mapped to -1 if they are below boundaries[0] or mapped to ncolors if they are above boundaries[-1]. These are then converted to valid indices by Colormap.__call__.  
extend{'neither', 'both', 'min', 'max'}, default: 'neither'


Extend the number of bins to include one or both of the regions beyond the boundaries. For example, if extend is 'min', then the color to which the region between the first pair of boundaries is mapped will be distinct from the first color in the colormap, and by default a Colorbar will be drawn with the triangle extension on the left or lower end.    Returns 
 int16 scalar or array
   Notes boundaries defines the edges of bins, and data falling within a bin is mapped to the color with the same index. If the number of bins, including any extensions, is less than ncolors, the color index is chosen by linear interpolation, mapping the [0, nbins - 1] range onto the [0, ncolors - 1] range.   __call__(value, clip=None)[source]
 
Normalize value data in the [vmin, vmax] interval into the [0.0, 1.0] interval and return it.  Parameters 
 value

Data to normalize.  
clipbool


If None, defaults to self.clip (which defaults to False).     Notes If not already initialized, self.vmin and self.vmax are initialized using self.autoscale_None(value). 
   inverse(value)[source]
 
 Raises 
 ValueError

BoundaryNorm is not invertible, so calling this method will always raise an error     
 
  Examples using matplotlib.colors.BoundaryNorm
 
   Multicolored lines   

   Creating annotated heatmaps   

   Image Masked   

   pcolormesh   

   Left ventricle bullseye   

   Colormap Normalizations   

   Customized Colorbars Tutorial   

   Colormap Normalization
__call__(value, clip=None)[source]
 
Normalize value data in the [vmin, vmax] interval into the [0.0, 1.0] interval and return it.  Parameters 
 value

Data to normalize.  
clipbool


If None, defaults to self.clip (which defaults to False).     Notes If not already initialized, self.vmin and self.vmax are initialized using self.autoscale_None(value).
inverse(value)[source]
 
 Raises 
 ValueError

BoundaryNorm is not invertible, so calling this method will always raise an error
matplotlib.colors.CenteredNorm   classmatplotlib.colors.CenteredNorm(vcenter=0, halfrange=None, clip=False)[source]
 
Bases: matplotlib.colors.Normalize Normalize symmetrical data around a center (0 by default). Unlike TwoSlopeNorm, CenteredNorm applies an equal rate of change around the center. Useful when mapping symmetrical data around a conceptual center e.g., data that range from -2 to 4, with 0 as the midpoint, and with equal rates of change around that midpoint.  Parameters 
 
vcenterfloat, default: 0


The data value that defines 0.5 in the normalization.  
halfrangefloat, optional


The range of data values that defines a range of 0.5 in the normalization, so that vcenter - halfrange is 0.0 and vcenter + halfrange is 1.0 in the normalization. Defaults to the largest absolute difference to vcenter for the values in the dataset.     Examples This maps data values -2 to 0.25, 0 to 0.5, and 4 to 1.0 (assuming equal rates of change above and below 0.0): >>> import matplotlib.colors as mcolors
>>> norm = mcolors.CenteredNorm(halfrange=4.0)
>>> data = [-2., 0., 4.]
>>> norm(data)
array([0.25, 0.5 , 1.  ])
   __call__(value, clip=None)[source]
 
Normalize value data in the [vmin, vmax] interval into the [0.0, 1.0] interval and return it.  Parameters 
 value

Data to normalize.  
clipbool


If None, defaults to self.clip (which defaults to False).     Notes If not already initialized, self.vmin and self.vmax are initialized using self.autoscale_None(value). 
   autoscale(A)[source]
 
Set halfrange to max(abs(A-vcenter)), then set vmin and vmax. 
   autoscale_None(A)[source]
 
Set vmin and vmax. 
   propertyhalfrange

   propertyvcenter

 
  Examples using matplotlib.colors.CenteredNorm
 
   Colormap Normalization
autoscale(A)[source]
 
Set halfrange to max(abs(A-vcenter)), then set vmin and vmax.
matplotlib.colors.Colormap   classmatplotlib.colors.Colormap(name, N=256)[source]
 
Bases: object Baseclass for all scalar to RGBA mappings. Typically, Colormap instances are used to convert data values (floats) from the interval [0, 1] to the RGBA color that the respective Colormap represents. For scaling of data into the [0, 1] interval see matplotlib.colors.Normalize. Subclasses of matplotlib.cm.ScalarMappable make heavy use of this data -> normalize -> map-to-color processing chain.  Parameters 
 
namestr


The name of the colormap.  
Nint


The number of rgb quantization levels.       __call__(X, alpha=None, bytes=False)[source]
 
 Parameters 
 
Xfloat or int, ndarray or scalar


The data value(s) to convert to RGBA. For floats, X should be in the interval [0.0, 1.0] to return the RGBA values X*100 percent along the Colormap line. For integers, X should be in the interval [0, Colormap.N) to return RGBA values indexed from the Colormap with index X.  
alphafloat or array-like or None


Alpha must be a scalar between 0 and 1, a sequence of such floats with shape matching X, or None.  
bytesbool


If False (default), the returned RGBA values will be floats in the interval [0, 1] otherwise they will be uint8s in the interval [0, 255].    Returns 
 Tuple of RGBA values if X is scalar, otherwise an array of
RGBA values with a shape of X.shape + (4, ).
   
   colorbar_extend
 
When this colormap exists on a scalar mappable and colorbar_extend is not False, colorbar creation will pick up colorbar_extend as the default value for the extend keyword in the matplotlib.colorbar.Colorbar constructor. 
   copy()[source]
 
Return a copy of the colormap. 
   get_bad()[source]
 
Get the color for masked values. 
   get_over()[source]
 
Get the color for high out-of-range values. 
   get_under()[source]
 
Get the color for low out-of-range values. 
   is_gray()[source]
 
Return whether the colormap is grayscale. 
   reversed(name=None)[source]
 
Return a reversed instance of the Colormap.  Note This function is not implemented for base class.   Parameters 
 
namestr, optional


The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "_r".      See also  LinearSegmentedColormap.reversed
ListedColormap.reversed
  
   set_bad(color='k', alpha=None)[source]
 
Set the color for masked values. 
   set_extremes(*, bad=None, under=None, over=None)[source]
 
Set the colors for masked (bad) values and, when norm.clip =
False, low (under) and high (over) out-of-range values. 
   set_over(color='k', alpha=None)[source]
 
Set the color for high out-of-range values. 
   set_under(color='k', alpha=None)[source]
 
Set the color for low out-of-range values. 
   with_extremes(*, bad=None, under=None, over=None)[source]
 
Return a copy of the colormap, for which the colors for masked (bad) values and, when norm.clip = False, low (under) and high (over) out-of-range values, have been set accordingly. 
 
  Examples using matplotlib.colors.Colormap
 
   Multicolored lines   

   Creating a colormap from a list of colors   

   Left ventricle bullseye   

   Customized Colorbars Tutorial   

   Creating Colormaps in Matplotlib
__call__(X, alpha=None, bytes=False)[source]
 
 Parameters 
 
Xfloat or int, ndarray or scalar


The data value(s) to convert to RGBA. For floats, X should be in the interval [0.0, 1.0] to return the RGBA values X*100 percent along the Colormap line. For integers, X should be in the interval [0, Colormap.N) to return RGBA values indexed from the Colormap with index X.  
alphafloat or array-like or None


Alpha must be a scalar between 0 and 1, a sequence of such floats with shape matching X, or None.  
bytesbool


If False (default), the returned RGBA values will be floats in the interval [0, 1] otherwise they will be uint8s in the interval [0, 255].    Returns 
 Tuple of RGBA values if X is scalar, otherwise an array of
RGBA values with a shape of X.shape + (4, ).
colorbar_extend
 
When this colormap exists on a scalar mappable and colorbar_extend is not False, colorbar creation will pick up colorbar_extend as the default value for the extend keyword in the matplotlib.colorbar.Colorbar constructor.
get_over()[source]
 
Get the color for high out-of-range values.
get_under()[source]
 
Get the color for low out-of-range values.
reversed(name=None)[source]
 
Return a reversed instance of the Colormap.  Note This function is not implemented for base class.   Parameters 
 
namestr, optional


The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "_r".      See also  LinearSegmentedColormap.reversed
ListedColormap.reversed
set_bad(color='k', alpha=None)[source]
 
Set the color for masked values.
set_extremes(*, bad=None, under=None, over=None)[source]
 
Set the colors for masked (bad) values and, when norm.clip =
False, low (under) and high (over) out-of-range values.
set_over(color='k', alpha=None)[source]
 
Set the color for high out-of-range values.
set_under(color='k', alpha=None)[source]
 
Set the color for low out-of-range values.
with_extremes(*, bad=None, under=None, over=None)[source]
 
Return a copy of the colormap, for which the colors for masked (bad) values and, when norm.clip = False, low (under) and high (over) out-of-range values, have been set accordingly.
matplotlib.colors.from_levels_and_colors   matplotlib.colors.from_levels_and_colors(levels, colors, extend='neither')[source]
 
A helper routine to generate a cmap and a norm instance which behave similar to contourf's levels and colors arguments.  Parameters 
 
levelssequence of numbers


The quantization levels used to construct the BoundaryNorm. Value v is quantized to level i if lev[i] <= v < lev[i+1].  
colorssequence of colors


The fill color to use for each level. If extend is "neither" there must be n_level - 1 colors. For an extend of "min" or "max" add one extra color, and for an extend of "both" add two colors.  
extend{'neither', 'min', 'max', 'both'}, optional


The behaviour when a value falls out of range of the given levels. See contourf for details.    Returns 
 
cmapNormalize


normColormap