neulab/docprompting-conala huggingface dataset:
matplotlib.pyplot.stairs   matplotlib.pyplot.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     
  Examples using matplotlib.pyplot.stairs
 
   Stairs Demo
matplotlib.pyplot.stem   matplotlib.pyplot.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.pyplot.stem
 
   Stem Plot
matplotlib.pyplot.step   matplotlib.pyplot.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.pyplot.step
 
   Stairs Demo   

   Step Demo
matplotlib.pyplot.streamplot   matplotlib.pyplot.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.
matplotlib.pyplot.subplot2grid   matplotlib.pyplot.subplot2grid(shape, loc, rowspan=1, colspan=1, fig=None, **kwargs)[source]
 
Create a subplot at a specific location inside a regular grid.  Parameters 
 
shape(int, int)


Number of rows and of columns of the grid in which to place axis.  
loc(int, int)


Row number and column number of the axis location within the grid.  
rowspanint, default: 1


Number of rows for the axis to span downwards.  
colspanint, default: 1


Number of columns for the axis to span to the right.  
figFigure, optional


Figure to place the subplot in. Defaults to the current figure.  **kwargs

Additional keyword arguments are handed to add_subplot.    Returns 
 
axes.SubplotBase, or another subclass of Axes


The axes of the subplot. The returned axes base class depends on the projection used. It is Axes if rectilinear projection is used and projections.polar.PolarAxes if polar projection is used. The returned axes is then a subplot subclass of the base class.     Notes The following call ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan)
 is identical to fig = gcf()
gs = fig.add_gridspec(nrows, ncols)
ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan])
 
  Examples using matplotlib.pyplot.subplot2grid
 
   Resizing axes with tight layout   

   subplot2grid demo   

   Constrained Layout Guide   

   Tight Layout guide
matplotlib.pyplot.subplot_mosaic   matplotlib.pyplot.subplot_mosaic(mosaic, *, sharex=False, sharey=False, subplot_kw=None, gridspec_kw=None, empty_sentinel='.', **fig_kw)[source]
 
Build a layout of Axes based on ASCII art or nested lists. This is a helper function to build complex GridSpec layouts visually.  Note This API is provisional and may be revised in the future based on early user feedback.   Parameters 
 
mosaiclist of list of {hashable or nested} or str


A visual layout of how you want your Axes to be arranged labeled as strings. For example x = [['A panel', 'A panel', 'edge'],
     ['C panel', '.',       'edge']]
 produces 4 axes:  'A panel' which is 1 row high and spans the first two columns 'edge' which is 2 rows high and is on the right edge 'C panel' which in 1 row and 1 column wide in the bottom left a blank space 1 row and 1 column wide in the bottom center  Any of the entries in the layout can be a list of lists of the same form to create nested layouts. If input is a str, then it must be of the form '''
AAE
C.E
'''
 where each character is a column and each line is a row. This only allows only single character Axes labels and does not allow nesting but is very terse.  
sharex, shareybool, default: False


If True, the x-axis (sharex) or y-axis (sharey) will be shared among all subplots. In that case, tick label visibility and axis units behave as for subplots. If False, each subplot's x- or y-axis will be independent.  
subplot_kwdict, optional


Dictionary with keywords passed to the Figure.add_subplot call used to create each subplot.  
gridspec_kwdict, optional


Dictionary with keywords passed to the GridSpec constructor used to create the grid the subplots are placed on.  
empty_sentinelobject, optional


Entry in the layout to mean "leave this space empty". Defaults to '.'. Note, if layout is a string, it is processed via inspect.cleandoc to remove leading white space, which may interfere with using white-space as the empty sentinel.  **fig_kw

All additional keyword arguments are passed to the pyplot.figure call.    Returns 
 
figFigure


The new figure  dict[label, Axes]

A dictionary mapping the labels to the Axes objects. The order of the axes is left-to-right and top-to-bottom of their position in the total layout.     
  Examples using matplotlib.pyplot.subplot_mosaic
 
   Image Demo   

   Labelling subplots   

   Basic Usage   

   Legend guide   

   Arranging multiple Axes in a Figure
matplotlib.pyplot.subplot_tool   matplotlib.pyplot.subplot_tool(targetfig=None)[source]
 
Launch a subplot tool window for a figure.  Returns 
 matplotlib.widgets.SubplotTool
matplotlib.pyplot.subplots_adjust   matplotlib.pyplot.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)[source]
 
Adjust the subplot layout parameters. Unset parameters are left unmodified; initial values are given by rcParams["figure.subplot.[name]"].  Parameters 
 
leftfloat, optional


The position of the left edge of the subplots, as a fraction of the figure width.  
rightfloat, optional


The position of the right edge of the subplots, as a fraction of the figure width.  
bottomfloat, optional


The position of the bottom edge of the subplots, as a fraction of the figure height.  
topfloat, optional


The position of the top edge of the subplots, as a fraction of the figure height.  
wspacefloat, optional


The width of the padding between subplots, as a fraction of the average Axes width.  
hspacefloat, optional


The height of the padding between subplots, as a fraction of the average Axes height.     
  Examples using matplotlib.pyplot.subplots_adjust
 
   Contour plot of irregularly spaced data   

   Subplots spacings and margins   

   Violin plot customization   

   Controlling style of text and labels using a dictionary   

   Parasite axis demo   

   Table Demo   

   Rotating custom tick labels   

   Buttons   

   Check Buttons   

   Radio Buttons   

   Thresholding an Image with RangeSlider   

   Slider   

   Snapping Sliders to Discrete Values   

   Pyplot tutorial
matplotlib.pyplot.summer   matplotlib.pyplot.summer()[source]
 
Set the colormap to 'summer'. 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.suptitle   matplotlib.pyplot.suptitle(t, **kwargs)[source]
 
Add a centered suptitle to the figure.  Parameters 
 
tstr


The suptitle text.  
xfloat, default: 0.5


The x location of the text in figure coordinates.  
yfloat, default: 0.98


The y location of the text in figure coordinates.  
horizontalalignment, ha{'center', 'left', 'right'}, default: center


The horizontal alignment of the text relative to (x, y).  
verticalalignment, va{'top', 'center', 'bottom', 'baseline'}, default: top


The vertical alignment of the text relative to (x, y).  
fontsize, sizedefault: rcParams["figure.titlesize"] (default: 'large')


The font size of the text. See Text.set_size for possible values.  
fontweight, weightdefault: rcParams["figure.titleweight"] (default: 'normal')


The font weight of the text. See Text.set_weight for possible values.    Returns 
 text

The Text instance of the suptitle.    Other Parameters 
 
fontpropertiesNone or dict, optional


A dict of font properties. If fontproperties is given the default values for font size and weight are taken from the FontProperties defaults. rcParams["figure.titlesize"] (default: 'large') and rcParams["figure.titleweight"] (default: 'normal') are ignored in this case.  **kwargs

Additional kwargs are matplotlib.text.Text properties.     
  Examples using matplotlib.pyplot.suptitle
 
   Nested Gridspecs   

   Pyplot tutorial   

   Constrained Layout Guide
matplotlib.pyplot.switch_backend   matplotlib.pyplot.switch_backend(newbackend)[source]
 
Close all open figures and set the Matplotlib backend. The argument is case-insensitive. Switching to an interactive backend is possible only if no event loop for another interactive backend has started. Switching to and from non-interactive backends is always possible.  Parameters 
 
newbackendstr


The name of the backend to use.
matplotlib.pyplot.table   matplotlib.pyplot.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       
  Examples using matplotlib.pyplot.table
 
   Table Demo
matplotlib.pyplot.thetagrids   matplotlib.pyplot.thetagrids(angles=None, labels=None, fmt=None, **kwargs)[source]
 
Get or set the theta gridlines on the current polar plot. Call signatures: lines, labels = thetagrids()
lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs)
 When called with no arguments, thetagrids simply returns the tuple (lines, labels). When called with arguments, the labels will appear at the specified angles.  Parameters 
 
anglestuple with floats, degrees


The angles of the theta gridlines.  
labelstuple with strings or None


The labels to use at each radial gridline. The projections.polar.ThetaFormatter will be used if None.  
fmtstr or None


Format string used in matplotlib.ticker.FormatStrFormatter. For example '%f'. Note that the angle in radians will be used.    Returns 
 
lineslist of lines.Line2D


The theta gridlines.  
labelslist of text.Text


The tick labels.    Other Parameters 
 **kwargs

kwargs are optional Text properties for the labels.      See also  pyplot.rgrids
projections.polar.PolarAxes.set_thetagrids
Axis.get_gridlines
Axis.get_ticklabels
  Examples # set the locations of the angular gridlines
lines, labels = thetagrids(range(45, 360, 90))

# set the locations and labels of the angular gridlines
lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE'))
matplotlib.pyplot.tick_params   matplotlib.pyplot.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.pyplot.tick_params
 
   Shared Axis
matplotlib.pyplot.ticklabel_format   matplotlib.pyplot.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.