neulab/docprompting-conala huggingface dataset:
matplotlib.colors.SymLogNorm   classmatplotlib.colors.SymLogNorm(linthresh, linscale=1.0, vmin=None, vmax=None, clip=False, *, base=10)[source]
 
Bases: matplotlib.colors.SymLogNorm The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter linthresh allows the user to specify the size of this range (-linthresh, linthresh).  Parameters 
 
linthreshfloat


The range within which the plot is linear (to avoid having the plot go to infinity around zero).  
linscalefloat, default: 1


This allows the linear range (-linthresh to linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.  
basefloat, default: 10

    Parameters 
 
vmin, vmaxfloat or None


If vmin and/or vmax is not given, they are initialized from the minimum and maximum value, respectively, of the first input processed; i.e., __call__(A) calls autoscale_None(A).  
clipbool, default: False


If True values falling outside the range [vmin, vmax], are mapped to 0 or 1, whichever is closer, and masked values are set to 1. If False masked values remain masked. Clipping silently defeats the purpose of setting the over, under, and masked colors in a colormap, so it is likely to lead to surprises; therefore the default is clip=False.     Notes Returns 0 if vmin == vmax.   __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]

 
  Examples using matplotlib.colors.SymLogNorm
 
   Colormap Normalizations   

   Colormap Normalizations Symlognorm   

   Colormap Normalization
matplotlib.colors.to_hex   matplotlib.colors.to_hex(c, keep_alpha=False)[source]
 
Convert c to a hex color.  Parameters 
 
ccolor or numpy.ma.masked

keep_alpha: bool, default: False

If False, use the #rrggbb format, otherwise use #rrggbbaa.    Returns 
 str

#rrggbb or #rrggbbaa hex color string
matplotlib.colors.to_rgb   matplotlib.colors.to_rgb(c)[source]
 
Convert c to an RGB color, silently dropping the alpha channel. 
  Examples using matplotlib.colors.to_rgb
 
   List of named colors
matplotlib.colors.to_rgba   matplotlib.colors.to_rgba(c, alpha=None)[source]
 
Convert c to an RGBA color.  Parameters 
 
cMatplotlib color or np.ma.masked


alphafloat, optional


If alpha is given, force the alpha value of the returned RGBA tuple to alpha. If None, the alpha value from c is used. If c does not have an alpha channel, then alpha defaults to 1. alpha is ignored for the color value "none" (case-insensitive), which always maps to (0, 0, 0, 0).    Returns 
 tuple

Tuple of floats (r, g, b, a), where each channel (red, green, blue, alpha) can assume values between 0 and 1.     
  Examples using matplotlib.colors.to_rgba
 
   Line, Poly and RegularPoly Collection with autoscaling   

   Line Collection   

   Lasso Demo   

   Ribbon Box
matplotlib.colors.to_rgba_array   matplotlib.colors.to_rgba_array(c, alpha=None)[source]
 
Convert c to a (n, 4) array of RGBA colors.  Parameters 
 
cMatplotlib color or array of colors


If c is a masked array, an ndarray is returned with a (0, 0, 0, 0) row for each masked value or row in c.  
alphafloat or sequence of floats, optional


If alpha is given, force the alpha value of the returned RGBA tuple to alpha. If None, the alpha value from c is used. If c does not have an alpha channel, then alpha defaults to 1. alpha is ignored for the color value "none" (case-insensitive), which always maps to (0, 0, 0, 0). If alpha is a sequence and c is a single color, c will be repeated to match the length of alpha.    Returns 
 array

(n, 4) array of RGBA colors, where each channel (red, green, blue, alpha) can assume values between 0 and 1.     
  Examples using matplotlib.colors.to_rgba_array
 
   Specifying Colors
matplotlib.colors.TwoSlopeNorm   classmatplotlib.colors.TwoSlopeNorm(vcenter, vmin=None, vmax=None)[source]
 
Bases: matplotlib.colors.Normalize Normalize data with a set center. Useful when mapping data with an unequal rates of change around a conceptual center, e.g., data that range from -2 to 4, with 0 as the midpoint.  Parameters 
 
vcenterfloat


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


The data value that defines 0.0 in the normalization. Defaults to the min value of the dataset.  
vmaxfloat, optional


The data value that defines 1.0 in the normalization. Defaults to the max value of the dataset.     Examples This maps data value -4000 to 0., 0 to 0.5, and +10000 to 1.0; data between is linearly interpolated: >>> import matplotlib.colors as mcolors
>>> offset = mcolors.TwoSlopeNorm(vmin=-4000.,
                                  vcenter=0., vmax=10000)
>>> data = [-4000., -2000., 0., 2500., 5000., 7500., 10000.]
>>> offset(data)
array([0., 0.25, 0.5, 0.625, 0.75, 0.875, 1.0])
   __call__(value, clip=None)[source]
 
Map value to the interval [0, 1]. The clip argument is unused. 
   autoscale_None(A)[source]
 
Get vmin and vmax, and then clip at vcenter 
   inverse(value)[source]

   propertyvcenter

 
  Examples using matplotlib.colors.TwoSlopeNorm
 
   Colormap Normalization
__call__(value, clip=None)[source]
 
Map value to the interval [0, 1]. The clip argument is unused.
autoscale_None(A)[source]
 
Get vmin and vmax, and then clip at vcenter
classmatplotlib.container.BarContainer(*args, **kwargs)[source]
 
Bases: matplotlib.container.Container Container for the artists of bar plots (e.g. created by Axes.bar). The container can be treated as a tuple of the patches themselves. Additionally, you can access these and further parameters by the attributes.  Attributes 
 
patcheslist of Rectangle


The artists of the bars.  
errorbarNone or ErrorbarContainer


A container for the error bar artists if error bars are present. None otherwise.  
datavaluesNone or array-like


The underlying data values corresponding to the bars.  
orientation{'vertical', 'horizontal'}, default: None


If 'vertical', the bars are assumed to be vertical. If 'horizontal', the bars are assumed to be horizontal.
classmatplotlib.container.Container(*args, **kwargs)[source]
 
Bases: tuple Base class for containers. Containers are classes that collect semantically related Artists such as the bars of a bar plot.   add_callback(func)[source]
 
Add a callback function that will be called whenever one of the Artist's properties changes.  Parameters 
 
funccallable


The callback function. It must have the signature: def func(artist: Artist) -> Any
 where artist is the calling Artist. Return values may exist but are ignored.    Returns 
 int

The observer id associated with the callback. This id can be used for removing the callback with remove_callback later.      See also  remove_callback
  
   get_children()[source]

   get_label()[source]
 
Return the label used for this artist in the legend. 
   pchanged()[source]
 
Call all of the registered callbacks. This function is triggered internally when a property is changed.  See also  add_callback
remove_callback
  
   remove()[source]

   remove_callback(oid)[source]
 
Remove a callback based on its observer id.  See also  add_callback
  
   set_label(s)[source]
 
Set a label that will be displayed in the legend.  Parameters 
 
sobject


s will be converted to a string by calling str.
classmatplotlib.container.ErrorbarContainer(*args, **kwargs)[source]
 
Bases: matplotlib.container.Container Container for the artists of error bars (e.g. created by Axes.errorbar). The container can be treated as the lines tuple itself. Additionally, you can access these and further parameters by the attributes.  Attributes 
 
linestuple


Tuple of (data_line, caplines, barlinecols).  data_line : Line2D instance of x, y plot markers and/or line. caplines : tuple of Line2D instances of the error bar caps. barlinecols : list of LineCollection with the horizontal and vertical error ranges.   
has_xerr, has_yerrbool


True if the errorbar has x/y errors.
classmatplotlib.container.StemContainer(*args, **kwargs)[source]
 
Bases: matplotlib.container.Container Container for the artists created in a Axes.stem() plot. The container can be treated like a namedtuple (markerline, stemlines,
baseline).  Attributes 
 
markerlineLine2D


The artist of the markers at the stem heads.  
stemlineslist of Line2D


The artists of the vertical lines for all stems.  
baselineLine2D


The artist of the horizontal baseline.      Parameters 
 
markerline_stemlines_baselinetuple


Tuple of (markerline, stemlines, baseline). markerline contains the LineCollection of the markers, stemlines is a LineCollection of the main lines, baseline is the Line2D of the baseline.
get_rotation()[source]
 
Return the text angle in degrees between 0 and 360.
add_label(x, y, rotation, lev, cvalue)[source]
 
Add contour label using Text class.
add_label_clabeltext(x, y, rotation, lev, cvalue)[source]
 
Add contour label using ClabelText class.
add_label_near(x, y, inline=True, inline_spacing=5, transform=None)[source]
 
Add a label near the point (x, y).  Parameters 
 
x, yfloat


The approximate location of the label.  
inlinebool, default: True


If True remove the segment of the contour beneath the label.  
inline_spacingint, default: 5


Space in pixels to leave on each side of label when placing inline. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours.  
transformTransform or False, default: self.axes.transData


A transform applied to (x, y) before labeling. The default causes (x, y) to be interpreted as data coordinates. False is a synonym for IdentityTransform; i.e. (x, y) should be interpreted as display coordinates.
calc_label_rot_and_inline(slc, ind, lw, lc=None, spacing=5)[source]
 
Calculate the appropriate label rotation given the linecontour coordinates in screen units, the index of the label location and the label width. If lc is not None or empty, also break contours and compute inlining. spacing is the empty space to leave around the label, in pixels. Both tasks are done together to avoid calculating path lengths multiple times, which is relatively costly. The method used here involves computing the path length along the contour in pixel coordinates and then looking approximately (label width / 2) away from central point to determine rotation and then to break contour if desired.
clabel(levels=None, *, fontsize=None, inline=True, inline_spacing=5, fmt=None, colors=None, use_clabeltext=False, manual=False, rightside_up=True, zorder=None)[source]
 
Label a contour plot. Adds labels to line contours in this ContourSet (which inherits from this mixin class).  Parameters 
 
levelsarray-like, optional


A list of level values, that should be labeled. The list must be a subset of cs.levels. If not given, all levels are labeled.  
fontsizestr or float, default: rcParams["font.size"] (default: 10.0)


Size in points or relative size e.g., 'smaller', 'x-large'. See Text.set_size for accepted string values.  
colorscolor or colors or None, default: None


The label colors:  If None, the color of each label matches the color of the corresponding contour. If one string color, e.g., colors = 'r' or colors = 'red', all labels will be plotted in this color. If a tuple of colors (string, float, rgb, etc), different labels will be plotted in different colors in the order specified.   
inlinebool, default: True


If True the underlying contour is removed where the label is placed.  
inline_spacingfloat, default: 5


Space in pixels to leave on each side of label when placing inline. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours.  
fmtFormatter or str or callable or dict, optional


How the levels are formatted:  If a Formatter, it is used to format all levels at once, using its Formatter.format_ticks method. If a str, it is interpreted as a %-style format string. If a callable, it is called with one level at a time and should return the corresponding label. If a dict, it should directly map levels to labels.  The default is to use a standard ScalarFormatter.  
manualbool or iterable, default: False


If True, contour labels will be placed manually using mouse clicks. Click the first button near a contour to add a label, click the second button (or potentially both mouse buttons at once) to finish adding labels. The third button can be used to remove the last label added, but only if labels are not inline. Alternatively, the keyboard can be used to select label locations (enter to end label placement, delete or backspace act like the third mouse button, and any other key will select a label location). manual can also be an iterable object of (x, y) tuples. Contour labels will be created as if mouse is clicked at each (x, y) position.  
rightside_upbool, default: True


If True, label rotations will always be plus or minus 90 degrees from level.  
use_clabeltextbool, default: False


If True, ClabelText class (instead of Text) is used to create labels. ClabelText recalculates rotation angles of texts during the drawing time, therefore this can be used if aspect of the axes changes.  
zorderfloat or None, default: (2 + contour.get_zorder())


zorder of the contour labels.    Returns 
 labels

A list of Text instances for the labels.
get_label_coords(distances, XX, YY, ysize, lw)[source]
 
[Deprecated] Return x, y, and the index of a label location. Labels are plotted at a location with the smallest deviation of the contour from a straight line unless there is another label nearby, in which case the next best place on the contour is picked up. If all such candidates are rejected, the beginning of the contour is chosen. Notes  Deprecated since version 3.4.
get_label_width(lev, fmt, fsize)[source]
 
[Deprecated] Return the width of the label in points. Notes  Deprecated since version 3.5.
get_text(lev, fmt)[source]
 
Get the text of the label.
locate_label(linecontour, labelwidth)[source]
 
Find good place to draw a label (relatively flat part of the contour).
pop_label(index=- 1)[source]
 
Defaults to removing last label, but any index can be supplied
print_label(linecontour, labelwidth)[source]
 
Return whether a contour is long enough to hold a label.
set_label_props(label, text, color)[source]
 
Set the label properties - color, fontsize, text.
too_close(x, y, lw)[source]
 
Return whether a label is already near this location.
find_nearest_contour(x, y, indices=None, pixel=True)[source]
 
Find the point in the contour plot that is closest to (x, y).  Parameters 
 
x, yfloat


The reference point.  
indiceslist of int or None, default: None


Indices of contour levels to consider. If None (the default), all levels are considered.  
pixelbool, default: True


If True, measure distance in pixel (screen) space, which is useful for manual contour labeling; else, measure distance in axes space.    Returns 
 
contourCollection


The contour that is closest to (x, y).  
segmentint


The index of the Path in contour that is closest to (x, y).  
indexint


The index of the path segment in segment that is closest to (x, y).  
xmin, yminfloat


The point in the contour plot that is closest to (x, y).  
d2float


The squared distance from (xmin, ymin) to (x, y).
get_alpha()[source]
 
Return alpha to be applied to all ContourSet artists.
legend_elements(variable_name='x', str_format=<class 'str'>)[source]
 
Return a list of artists and labels suitable for passing through to legend which represent this ContourSet. The labels have the form "0 < x <= 1" stating the data ranges which the artists represent.  Parameters 
 
variable_namestr


The string used inside the inequality used on the labels.  
str_formatfunction: float -> str


Function used to format the numbers in the labels.    Returns 
 
artistslist[Artist]


A list of the artists.  
labelslist[str]


A list of the labels.
set_alpha(alpha)[source]
 
Set the alpha blending value for all ContourSet artists. alpha must be between 0 (transparent) and 1 (opaque).
classmatplotlib.contour.QuadContourSet(ax, *args, levels=None, filled=False, linewidths=None, linestyles=None, hatches=(None,), alpha=None, origin=None, extent=None, cmap=None, colors=None, norm=None, vmin=None, vmax=None, extend='neither', antialiased=None, nchunk=0, locator=None, transform=None, **kwargs)[source]
 
Bases: matplotlib.contour.ContourSet Create and store a set of contour lines or filled regions. This class is typically not instantiated directly by the user but by contour and contourf.  Attributes 
 
axAxes


The Axes object in which the contours are drawn.  
collectionssilent_list of PathCollections


The Artists representing the contour. This is a list of PathCollections for both line and filled contours.  
levelsarray


The values of the contour levels.  
layersarray


Same as levels for line contours; half-way between levels for filled contours. See ContourSet._process_colors.     Draw contour lines or filled regions, depending on whether keyword arg filled is False (default) or True. Call signature: ContourSet(ax, levels, allsegs, [allkinds], **kwargs)
  Parameters 
 
axAxes


The Axes object to draw on.  
levels[level0, level1, ..., leveln]


A list of floating point numbers indicating the contour levels.  
allsegs[level0segs, level1segs, ...]


List of all the polygon segments for all the levels. For contour lines len(allsegs) == len(levels), and for filled contour regions len(allsegs) = len(levels)-1. The lists should look like level0segs = [polygon0, polygon1, ...]
polygon0 = [[x0, y0], [x1, y1], ...]
  
allkinds[level0kinds, level1kinds, ...], optional


Optional list of all the polygon vertex kinds (code types), as described and used in Path. This is used to allow multiply- connected paths such as holes within filled polygons. If not None, len(allkinds) == len(allsegs). The lists should look like level0kinds = [polygon0kinds, ...]
polygon0kinds = [vertexcode0, vertexcode1, ...]
 If allkinds is not None, usually all polygons for a particular contour level are grouped together so that level0segs = [polygon0] and level0kinds = [polygon0kinds].  **kwargs

Keyword arguments are as described in the docstring of contour.
classmatplotlib.dates.AutoDateFormatter(locator, tz=None, defaultfmt='%Y-%m-%d', *, usetex=None)[source]
 
Bases: matplotlib.ticker.Formatter A Formatter which attempts to figure out the best format to use. This is most useful when used with the AutoDateLocator. AutoDateFormatter has a .scale dictionary that maps tick scales (the interval in days between one major tick) to format strings; this dictionary defaults to self.scaled = {
    DAYS_PER_YEAR: rcParams['date.autoformat.year'],
    DAYS_PER_MONTH: rcParams['date.autoformat.month'],
    1: rcParams['date.autoformat.day'],
    1 / HOURS_PER_DAY: rcParams['date.autoformat.hour'],
    1 / MINUTES_PER_DAY: rcParams['date.autoformat.minute'],
    1 / SEC_PER_DAY: rcParams['date.autoformat.second'],
    1 / MUSECONDS_PER_DAY: rcParams['date.autoformat.microsecond'],
}
 The formatter uses the format string corresponding to the lowest key in the dictionary that is greater or equal to the current scale. Dictionary entries can be customized: locator = AutoDateLocator()
formatter = AutoDateFormatter(locator)
formatter.scaled[1/(24*60)] = '%M:%S' # only show min and sec
 Custom callables can also be used instead of format strings. The following example shows how to use a custom format function to strip trailing zeros from decimal seconds and adds the date to the first ticklabel: def my_format_function(x, pos=None):
    x = matplotlib.dates.num2date(x)
    if pos == 0:
        fmt = '%D %H:%M:%S.%f'
    else:
        fmt = '%H:%M:%S.%f'
    label = x.strftime(fmt)
    label = label.rstrip("0")
    label = label.rstrip(".")
    return label

formatter.scaled[1/(24*60)] = my_format_function
 Autoformat the date labels.  Parameters 
 
locatorticker.Locator


Locator that this axis is using.  
tzstr, optional


Passed to dates.date2num.  
defaultfmtstr


The default format to use if none of the values in self.scaled are greater than the unit returned by locator._get_unit().  
usetexbool, default: rcParams["text.usetex"] (default: False)


To enable/disable the use of TeX's math mode for rendering the results of the formatter. If any entries in self.scaled are set as functions, then it is up to the customized function to enable or disable TeX's math mode itself.
classmatplotlib.dates.AutoDateLocator(tz=None, minticks=5, maxticks=None, interval_multiples=True)[source]
 
Bases: matplotlib.dates.DateLocator On autoscale, this class picks the best DateLocator to set the view limits and the tick locations.  Attributes 
 
intervalddict


Mapping of tick frequencies to multiples allowed for that ticking. The default is self.intervald = {
    YEARLY  : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500,
               1000, 2000, 4000, 5000, 10000],
    MONTHLY : [1, 2, 3, 4, 6],
    DAILY   : [1, 2, 3, 7, 14, 21],
    HOURLY  : [1, 2, 3, 4, 6, 12],
    MINUTELY: [1, 5, 10, 15, 30],
    SECONDLY: [1, 5, 10, 15, 30],
    MICROSECONDLY: [1, 2, 5, 10, 20, 50, 100, 200, 500,
                    1000, 2000, 5000, 10000, 20000, 50000,
                    100000, 200000, 500000, 1000000],
}
 where the keys are defined in dateutil.rrule. The interval is used to specify multiples that are appropriate for the frequency of ticking. For instance, every 7 days is sensible for daily ticks, but for minutes/seconds, 15 or 30 make sense. When customizing, you should only modify the values for the existing keys. You should not add or delete entries. Example for forcing ticks every 3 hours: locator = AutoDateLocator()
locator.intervald[HOURLY] = [3]  # only show every 3 hours
      Parameters 
 
tzdatetime.tzinfo


Ticks timezone.  
minticksint


The minimum number of ticks desired; controls whether ticks occur yearly, monthly, etc.  
maxticksint


The maximum number of ticks desired; controls the interval between ticks (ticking every other, every 3, etc.). For fine-grained control, this can be a dictionary mapping individual rrule frequency constants (YEARLY, MONTHLY, etc.) to their own maximum number of ticks. This can be used to keep the number of ticks appropriate to the format chosen in AutoDateFormatter. Any frequency not specified in this dictionary is given a default value.  
interval_multiplesbool, default: True


Whether ticks should be chosen to be multiple of the interval, locking them to 'nicer' locations. For example, this will force the ticks to be at hours 0, 6, 12, 18 when hourly ticking is done at 6 hour intervals.       get_locator(dmin, dmax)[source]
 
Pick the best locator based on a distance. 
   nonsingular(vmin, vmax)[source]
 
Given the proposed upper and lower extent, adjust the range if it is too close to being singular (i.e. a range of ~0). 
   tick_values(vmin, vmax)[source]
 
Return the values of the located ticks given vmin and vmax.  Note To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance: >>> print(type(loc))
<type 'Locator'>
>>> print(loc())
[1, 2, 3, 4]
get_locator(dmin, dmax)[source]
 
Pick the best locator based on a distance.
nonsingular(vmin, vmax)[source]
 
Given the proposed upper and lower extent, adjust the range if it is too close to being singular (i.e. a range of ~0).
classmatplotlib.dates.ConciseDateConverter(formats=None, zero_formats=None, offset_formats=None, show_offset=True, *, interval_multiples=True)[source]
 
Bases: matplotlib.dates.DateConverter   axisinfo(unit, axis)[source]
 
Return the AxisInfo for unit. unit is a tzinfo instance or None. The axis argument is required but not used.