neulab/docprompting-conala huggingface dataset:
matplotlib.axes.Axes.stackplot   Axes.stackplot(x, *args, labels=(), colors=None, baseline='zero', data=None, **kwargs)[source]
 
Draw a stacked area plot.  Parameters 
 
x(N,) array-like


y(M, N) array-like


The data is assumed to be unstacked. Each of the following calls is legal: stackplot(x, y)           # where y has shape (M, N)
stackplot(x, y1, y2, y3)  # where y1, y2, y3, y4 have length N
  
baseline{'zero', 'sym', 'wiggle', 'weighted_wiggle'}


Method used to calculate the baseline:  
'zero': Constant zero baseline, i.e. a simple stacked plot. 
'sym': Symmetric around zero and is sometimes called 'ThemeRiver'. 
'wiggle': Minimizes the sum of the squared slopes. 
'weighted_wiggle': Does the same but weights to account for size of each layer. It is also called 'Streamgraph'-layout. More details can be found at http://leebyron.com/streamgraph/.   
labelslist of str, optional


A sequence of labels to assign to each data series. If unspecified, then no labels will be applied to artists.  
colorslist of color, optional


A sequence of colors to be cycled through and used to color the stacked areas. The sequence need not be exactly the same length as the number of provided y, in which case the colors will repeat from the beginning. If not specified, the colors from the Axes property cycle will be used.  
dataindexable object, optional


If given, all parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception).  **kwargs

All other keyword arguments are passed to Axes.fill_between.    Returns 
 list of PolyCollection


A list of PolyCollection instances, one for each element in the stacked area plot.     
  Examples using matplotlib.axes.Axes.stackplot
 
   Stackplots and streamgraphs
matplotlib.axes.Axes.stairs   Axes.stairs(values, edges=None, *, orientation='vertical', baseline=0, fill=False, data=None, **kwargs)[source]
 
A stepwise constant function as a line with bounding edges or a filled plot.  Parameters 
 
valuesarray-like


The step heights.  
edgesarray-like


The edge positions, with len(edges) == len(vals) + 1, between which the curve takes on vals values.  
orientation{'vertical', 'horizontal'}, default: 'vertical'


The direction of the steps. Vertical means that values are along the y-axis, and edges are along the x-axis.  
baselinefloat, array-like or None, default: 0


The bottom value of the bounding edges or when fill=True, position of lower edge. If fill is True or an array is passed to baseline, a closed path is drawn.  
fillbool, default: False


Whether the area under the step curve should be filled.    Returns 
 
StepPatchmatplotlib.patches.StepPatch

  Other Parameters 
 
dataindexable object, optional


If given, all parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception).  **kwargs

StepPatch properties
matplotlib.axes.Axes.stale   propertyAxes.stale
 
Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist.
matplotlib.axes.Axes.start_pan   Axes.start_pan(x, y, button)[source]
 
Called when a pan operation has started.  Parameters 
 
x, yfloat


The mouse coordinates in display coords.  
buttonMouseButton


The pressed mouse button.     Notes This is intended to be overridden by new projection types.
matplotlib.axes.Axes.stem   Axes.stem(*args, linefmt=None, markerfmt=None, basefmt=None, bottom=0, label=None, use_line_collection=True, orientation='vertical', data=None)[source]
 
Create a stem plot. A stem plot draws lines perpendicular to a baseline at each location locs from the baseline to heads, and places a marker there. For vertical stem plots (the default), the locs are x positions, and the heads are y values. For horizontal stem plots, the locs are y positions, and the heads are x values. Call signature: stem([locs,] heads, linefmt=None, markerfmt=None, basefmt=None)
 The locs-positions are optional. The formats may be provided either as positional or as keyword-arguments.  Parameters 
 
locsarray-like, default: (0, 1, ..., len(heads) - 1)


For vertical stem plots, the x-positions of the stems. For horizontal stem plots, the y-positions of the stems.  
headsarray-like


For vertical stem plots, the y-values of the stem heads. For horizontal stem plots, the x-values of the stem heads.  
linefmtstr, optional


A string defining the color and/or linestyle of the vertical lines:   
Character Line Style   
'-' solid line  
'--' dashed line  
'-.' dash-dot line  
':' dotted line   Default: 'C0-', i.e. solid line with the first color of the color cycle. Note: Markers specified through this parameter (e.g. 'x') will be silently ignored (unless using use_line_collection=False). Instead, markers should be specified using markerfmt.  
markerfmtstr, optional


A string defining the color and/or shape of the markers at the stem heads. Default: 'C0o', i.e. filled circles with the first color of the color cycle.  
basefmtstr, default: 'C3-' ('C2-' in classic mode)


A format string defining the properties of the baseline.  
orientationstr, default: 'vertical'


If 'vertical', will produce a plot with stems oriented vertically, otherwise the stems will be oriented horizontally.  
bottomfloat, default: 0


The y/x-position of the baseline (depending on orientation).  
labelstr, default: None


The label to use for the stems in legends.  
use_line_collectionbool, default: True


If True, store and plot the stem lines as a LineCollection instead of individual lines, which significantly increases performance. If False, defaults to the old behavior of using a list of Line2D objects. This parameter may be deprecated in the future.  
dataindexable object, optional


If given, all parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception).    Returns 
 StemContainer

The container may be treated like a tuple (markerline, stemlines, baseline)     Notes  See also The MATLAB function stem which inspired this method.  
  Examples using matplotlib.axes.Axes.stem
 
   Legend Demo   

   3D stem   

   stem(x, y)
matplotlib.axes.Axes.step   Axes.step(x, y, *args, where='pre', data=None, **kwargs)[source]
 
Make a step plot. Call signatures: step(x, y, [fmt], *, data=None, where='pre', **kwargs)
step(x, y, [fmt], x2, y2, [fmt2], ..., *, where='pre', **kwargs)
 This is just a thin wrapper around plot which changes some formatting options. Most of the concepts and parameters of plot can be used here as well.  Note This method uses a standard plot with a step drawstyle: The x values are the reference positions and steps extend left/right/both directions depending on where. For the common case where you know the values and edges of the steps, use stairs instead.   Parameters 
 
xarray-like


1D sequence of x positions. It is assumed, but not checked, that it is uniformly increasing.  
yarray-like


1D sequence of y levels.  
fmtstr, optional


A format string, e.g. 'g' for a green line. See plot for a more detailed description. Note: While full format strings are accepted, it is recommended to only specify the color. Line styles are currently ignored (use the keyword argument linestyle instead). Markers are accepted and plotted on the given positions, however, this is a rarely needed feature for step plots.  
where{'pre', 'post', 'mid'}, default: 'pre'


Define where the steps should be placed:  'pre': The y value is continued constantly to the left from every x position, i.e. the interval (x[i-1], x[i]] has the value y[i]. 'post': The y value is continued constantly to the right from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i]. 'mid': Steps occur half-way between the x positions.   
dataindexable object, optional


An object with labelled data. If given, provide the label names to plot in x and y.  **kwargs

Additional parameters are the same as those for plot.    Returns 
 list of Line2D


Objects representing the plotted data.     
  Examples using matplotlib.axes.Axes.step
 
   step(x, y)
matplotlib.axes.Axes.streamplot   Axes.streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, transform=None, zorder=None, start_points=None, maxlength=4.0, integration_direction='both', *, data=None)[source]
 
Draw streamlines of a vector flow.  Parameters 
 
x, y1D/2D arrays


Evenly spaced strictly increasing arrays to make a grid. If 2D, all rows of x must be equal and all columns of y must be equal; i.e., they must be as if generated by np.meshgrid(x_1d, y_1d).  
u, v2D arrays


x and y-velocities. The number of rows and columns must match the length of y and x, respectively.  
densityfloat or (float, float)


Controls the closeness of streamlines. When density = 1, the domain is divided into a 30x30 grid. density linearly scales this grid. Each cell in the grid can have, at most, one traversing streamline. For different densities in each direction, use a tuple (density_x, density_y).  
linewidthfloat or 2D array


The width of the stream lines. With a 2D array the line width can be varied across the grid. The array must have the same shape as u and v.  
colorcolor or 2D array


The streamline color. If given an array, its values are converted to colors using cmap and norm. The array must have the same shape as u and v.  
cmapColormap


Colormap used to plot streamlines and arrows. This is only used if color is an array.  
normNormalize


Normalize object used to scale luminance data to 0, 1. If None, stretch (min, max) to (0, 1). This is only used if color is an array.  
arrowsizefloat


Scaling factor for the arrow size.  
arrowstylestr


Arrow style specification. See FancyArrowPatch.  
minlengthfloat


Minimum length of streamline in axes coordinates.  
start_pointsNx2 array


Coordinates of starting points for the streamlines in data coordinates (the same coordinates as the x and y arrays).  
zorderint


The zorder of the stream lines and arrows. Artists with lower zorder values are drawn first.  
maxlengthfloat


Maximum length of streamline in axes coordinates.  
integration_direction{'forward', 'backward', 'both'}, default: 'both'


Integrate the streamline in forward, backward or both directions.  
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, u, v, start_points    Returns 
 StreamplotSet

Container object with attributes  
lines: LineCollection of streamlines 
arrows: PatchCollection containing FancyArrowPatch objects representing the arrows half-way along stream lines.  This container will probably change in the future to allow changes to the colormap, alpha, etc. for both lines and arrows, but these changes should be backward compatible.     
  Examples using matplotlib.axes.Axes.streamplot
 
   Streamplot   

   streamplot(X, Y, U, V)
matplotlib.axes.Axes.table   Axes.table(cellText=None, cellColours=None, cellLoc='right', colWidths=None, rowLabels=None, rowColours=None, rowLoc='left', colLabels=None, colColours=None, colLoc='center', loc='bottom', bbox=None, edges='closed', **kwargs)[source]
 
Add a table to an Axes. At least one of cellText or cellColours must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements. The table can optionally have row and column headers, which are configured using rowLabels, rowColours, rowLoc and colLabels, colColours, colLoc respectively. For finer grained control over tables, use the Table class and add it to the axes with Axes.add_table.  Parameters 
 
cellText2D list of str, optional


The texts to place into the table cells. Note: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries.  
cellColours2D list of colors, optional


The background colors of the cells.  
cellLoc{'left', 'center', 'right'}, default: 'right'


The alignment of the text within the cells.  
colWidthslist of float, optional


The column widths in units of the axes. If not given, all columns will have a width of 1 / ncols.  
rowLabelslist of str, optional


The text of the row header cells.  
rowColourslist of colors, optional


The colors of the row header cells.  
rowLoc{'left', 'center', 'right'}, default: 'left'


The text alignment of the row header cells.  
colLabelslist of str, optional


The text of the column header cells.  
colColourslist of colors, optional


The colors of the column header cells.  
colLoc{'left', 'center', 'right'}, default: 'left'


The text alignment of the column header cells.  
locstr, optional


The position of the cell with respect to ax. This must be one of the codes.  
bboxBbox, optional


A bounding box to draw the table into. If this is not None, this overrides loc.  
edgessubstring of 'BRTL' or {'open', 'closed', 'horizontal', 'vertical'}


The cell edges to be drawn with a line. See also visible_edges.    Returns 
 Table

The created table.    Other Parameters 
 **kwargs

Table properties.   
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  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
figure Figure  
fontsize float  
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  
transform Transform  
url str  
visible bool  
zorder float
matplotlib.axes.Axes.tick_params   Axes.tick_params(axis='both', **kwargs)[source]
 
Change the appearance of ticks, tick labels, and gridlines. Tick properties that are not explicitly set using the keyword arguments remain unchanged unless reset is True.  Parameters 
 
axis{'x', 'y', 'both'}, default: 'both'


The axis to which the parameters are applied.  
which{'major', 'minor', 'both'}, default: 'major'


The group of ticks to which the parameters are applied.  
resetbool, default: False


Whether to reset the ticks to defaults before updating them.    Other Parameters 
 
direction{'in', 'out', 'inout'}


Puts ticks inside the axes, outside the axes, or both.  
lengthfloat


Tick length in points.  
widthfloat


Tick width in points.  
colorcolor


Tick color.  
padfloat


Distance in points between tick and label.  
labelsizefloat or str


Tick label font size in points or as a string (e.g., 'large').  
labelcolorcolor


Tick label color.  
colorscolor


Tick color and label color.  
zorderfloat


Tick and label zorder.  
bottom, top, left, rightbool


Whether to draw the respective ticks.  
labelbottom, labeltop, labelleft, labelrightbool


Whether to draw the respective tick labels.  
labelrotationfloat


Tick label rotation  
grid_colorcolor


Gridline color.  
grid_alphafloat


Transparency of gridlines: 0 (transparent) to 1 (opaque).  
grid_linewidthfloat


Width of gridlines in points.  
grid_linestylestr


Any valid Line2D line style spec.     Examples ax.tick_params(direction='out', length=6, width=2, colors='r',
               grid_color='r', grid_alpha=0.5)
 This will make all major ticks be red, pointing out of the box, and with dimensions 6 points by 2 points. Tick labels will also be red. Gridlines will be red and translucent. 
  Examples using matplotlib.axes.Axes.tick_params
 
   Scatter plot with histograms   

   Creating annotated heatmaps   

   Axes Props   

   Broken Axis   

   Plots with different scales   

   Polar Legend   

   Color Demo   

   Inset Locator Demo   

   Inset Locator Demo2   

   Make Room For Ylabel Using Axesgrid   

   Simple Axes Divider 3   

   Anatomy of a figure   

   Bachelor's degrees by gender   

   Anscombe's quartet   

   Multiple Yaxis With Spines   

   Major and minor ticks   

   Text in Matplotlib Plots
matplotlib.axes.Axes.ticklabel_format   Axes.ticklabel_format(*, axis='both', style='', scilimits=None, useOffset=None, useLocale=None, useMathText=None)[source]
 
Configure the ScalarFormatter used by default for linear axes. If a parameter is not set, the corresponding property of the formatter is left unchanged.  Parameters 
 
axis{'x', 'y', 'both'}, default: 'both'


The axis to configure. Only major ticks are affected.  
style{'sci', 'scientific', 'plain'}


Whether to use scientific notation. The formatter default is to use scientific notation.  
scilimitspair of ints (m, n)


Scientific notation is used only for numbers outside the range 10m to 10n (and only if the formatter is configured to use scientific notation at all). Use (0, 0) to include all numbers. Use (m, m) where m != 0 to fix the order of magnitude to 10m. The formatter default is rcParams["axes.formatter.limits"] (default: [-5, 6]).  
useOffsetbool or float


If True, the offset is calculated as needed. If False, no offset is used. If a numeric value, it sets the offset. The formatter default is rcParams["axes.formatter.useoffset"] (default: True).  
useLocalebool


Whether to format the number using the current locale or using the C (English) locale. This affects e.g. the decimal separator. The formatter default is rcParams["axes.formatter.use_locale"] (default: False).  
useMathTextbool


Render the offset and scientific notation in mathtext. The formatter default is rcParams["axes.formatter.use_mathtext"] (default: False).    Raises 
 AttributeError

If the current formatter is not a ScalarFormatter.     
  Examples using matplotlib.axes.Axes.ticklabel_format
 
   The default tick formatter
matplotlib.axes.Axes.tripcolor   Axes.tripcolor(*args, alpha=1.0, norm=None, cmap=None, vmin=None, vmax=None, shading='flat', facecolors=None, **kwargs)[source]
 
Create a pseudocolor plot of an unstructured triangular grid. The triangulation can be specified in one of two ways; either: tripcolor(triangulation, ...)
 where triangulation is a Triangulation object, or tripcolor(x, y, ...)
tripcolor(x, y, triangles, ...)
tripcolor(x, y, triangles=triangles, ...)
tripcolor(x, y, mask=mask, ...)
tripcolor(x, y, triangles, mask=mask, ...)
 in which case a Triangulation object will be created. See Triangulation for a explanation of these possibilities. The next argument must be C, the array of color values, either one per point in the triangulation if color values are defined at points, or one per triangle in the triangulation if color values are defined at triangles. If there are the same number of points and triangles in the triangulation it is assumed that color values are defined at points; to force the use of color values at triangles use the kwarg facecolors=C instead of just C. shading may be 'flat' (the default) or 'gouraud'. If shading is 'flat' and C values are defined at points, the color values used for each triangle are from the mean C of the triangle's three points. If shading is 'gouraud' then color values must be defined at points. The remaining kwargs are the same as for pcolor. 
  Examples using matplotlib.axes.Axes.tripcolor
 
   Tripcolor Demo   

   tripcolor(x, y, z)
matplotlib.axes.Axes.triplot   Axes.triplot(*args, **kwargs)[source]
 
Draw a unstructured triangular grid as lines and/or markers. The triangulation to plot can be specified in one of two ways; either: triplot(triangulation, ...)
 where triangulation is a Triangulation object, or triplot(x, y, ...)
triplot(x, y, triangles, ...)
triplot(x, y, triangles=triangles, ...)
triplot(x, y, mask=mask, ...)
triplot(x, y, triangles, mask=mask, ...)
 in which case a Triangulation object will be created. See Triangulation for a explanation of these possibilities. The remaining args and kwargs are the same as for plot.  Returns 
 
linesLine2D


The drawn triangles edges.  
markersLine2D


The drawn marker nodes.     
  Examples using matplotlib.axes.Axes.triplot
 
   Tricontour Smooth Delaunay   

   Tricontour Smooth User   

   Trigradient Demo   

   Triplot Demo   

   Trifinder Event Demo   

   triplot(x, y)
matplotlib.axes.Axes.twinx   Axes.twinx()[source]
 
Create a twin Axes sharing the xaxis. Create a new Axes with an invisible x-axis and an independent y-axis positioned opposite to the original one (i.e. at right). The x-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both y-axes align, see LinearLocator.  Returns 
 Axes

The newly created Axes instance     Notes For those who are 'picking' artists while using twinx, pick events are only called for the artists in the top-most Axes. 
  Examples using matplotlib.axes.Axes.twinx
 
   Axes box aspect   

   Plots with different scales   

   Parasite Simple   

   Parasite axis demo   

   Multiple Yaxis With Spines   

   Basic Usage
matplotlib.axes.Axes.twiny   Axes.twiny()[source]
 
Create a twin Axes sharing the yaxis. Create a new Axes with an invisible y-axis and an independent x-axis positioned opposite to the original one (i.e. at top). The y-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both x-axes align, see LinearLocator.  Returns 
 Axes

The newly created Axes instance     Notes For those who are 'picking' artists while using twiny, pick events are only called for the artists in the top-most Axes.
matplotlib.axes.Axes.update_datalim   Axes.update_datalim(xys, updatex=True, updatey=True)[source]
 
Extend the dataLim Bbox to include the given points. If no data is set currently, the Bbox will ignore its limits and set the bound to be the bounds of the xydata (xys). Otherwise, it will compute the bounds of the union of its current data and the data in xys.  Parameters 
 
xys2D array-like


The points to include in the data limits Bbox. This can be either a list of (x, y) tuples or a Nx2 array.  
updatex, updateybool, default: True


Whether to update the x/y limits.
matplotlib.axes.Axes.use_sticky_edges   propertyAxes.use_sticky_edges
 
When autoscaling, whether to obey all Artist.sticky_edges. Default is True. Setting this to False ensures that the specified margins will be applied, even if the plot includes an image, for example, which would otherwise force a view limit to coincide with its data limit. The changing this property does not change the plot until autoscale or autoscale_view is called.