neulab/docprompting-conala huggingface dataset:
matplotlib.pyplot.ioff   matplotlib.pyplot.ioff()[source]
 
Disable interactive mode. See pyplot.isinteractive for more details.  See also  ion

Enable interactive mode.  isinteractive

Whether interactive mode is enabled.  show

Show all figures (and maybe block).  pause

Show all figures, and block for a time.    Notes For a temporary change, this can be used as a context manager: # if interactive mode is on
# then figures will be shown on creation
plt.ion()
# This figure will be shown immediately
fig = plt.figure()

with plt.ioff():
    # interactive mode will be off
    # figures will not automatically be shown
    fig2 = plt.figure()
    # ...
 To enable usage as a context manager, this function returns an _IoffContext object. The return value is not intended to be stored or accessed by the user.
matplotlib.pyplot.ion   matplotlib.pyplot.ion()[source]
 
Enable interactive mode. See pyplot.isinteractive for more details.  See also  ioff

Disable interactive mode.  isinteractive

Whether interactive mode is enabled.  show

Show all figures (and maybe block).  pause

Show all figures, and block for a time.    Notes For a temporary change, this can be used as a context manager: # if interactive mode is off
# then figures will not be shown on creation
plt.ioff()
# This figure will not be shown immediately
fig = plt.figure()

with plt.ion():
    # interactive mode will be on
    # figures will automatically be shown
    fig2 = plt.figure()
    # ...
 To enable usage as a context manager, this function returns an _IonContext object. The return value is not intended to be stored or accessed by the user.
matplotlib.pyplot.isinteractive   matplotlib.pyplot.isinteractive()[source]
 
Return whether plots are updated after every plotting command. The interactive mode is mainly useful if you build plots from the command line and want to see the effect of each command while you are building the figure. In interactive mode:  newly created figures will be shown immediately; figures will automatically redraw on change; 
pyplot.show will not block by default.  In non-interactive mode:  newly created figures and changes to figures will not be reflected until explicitly asked to be; 
pyplot.show will block by default.   See also  ion

Enable interactive mode.  ioff

Disable interactive mode.  show

Show all figures (and maybe block).  pause

Show all figures, and block for a time.
matplotlib.pyplot.jet   matplotlib.pyplot.jet()[source]
 
Set the colormap to 'jet'. 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.locator_params   matplotlib.pyplot.locator_params(axis='both', tight=None, **kwargs)[source]
 
Control behavior of major tick locators. Because the locator is involved in autoscaling, autoscale_view is called automatically after the parameters are changed.  Parameters 
 
axis{'both', 'x', 'y'}, default: 'both'


The axis on which to operate.  
tightbool or None, optional


Parameter passed to autoscale_view. Default is None, for no change.    Other Parameters 
 **kwargs

Remaining keyword arguments are passed to directly to the set_params() method of the locator. Supported keywords depend on the type of the locator. See for example set_params for the ticker.MaxNLocator used by default for linear axes.     Examples When plotting small subplots, one might want to reduce the maximum number of ticks and use tight bounds, for example: ax.locator_params(tight=True, nbins=4)
matplotlib.pyplot.loglog   matplotlib.pyplot.loglog(*args, **kwargs)[source]
 
Make a plot with log scaling on both the x and y axis. Call signatures: loglog([x], y, [fmt], data=None, **kwargs)
loglog([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
 This is just a thin wrapper around plot which additionally changes both the x-axis and the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters base, subs and nonpositive control the x/y-axis properties. They are just forwarded to Axes.set_xscale and Axes.set_yscale. To use different properties on the x-axis and the y-axis, use e.g. ax.set_xscale("log", base=10); ax.set_yscale("log", base=2).  Parameters 
 
basefloat, default: 10


Base of the logarithm.  
subssequence, optional


The location of the minor ticks. If None, reasonable locations are automatically chosen depending on the number of decades in the plot. See Axes.set_xscale/Axes.set_yscale for details.  
nonpositive{'mask', 'clip'}, default: 'mask'


Non-positive values can be masked as invalid, or clipped to a very small positive number.  **kwargs

All parameters supported by plot.    Returns 
 list of Line2D


Objects representing the plotted data.
matplotlib.pyplot.magma   matplotlib.pyplot.magma()[source]
 
Set the colormap to 'magma'. 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.margins   matplotlib.pyplot.margins(*margins, x=None, y=None, tight=True)[source]
 
Set or retrieve autoscaling margins. The padding added to each limit of the Axes is the margin times the data interval. All input parameters must be floats within the range [0, 1]. Passing both positional and keyword arguments is invalid and will raise a TypeError. If no arguments (positional or otherwise) are provided, the current margins will remain in place and simply be returned. Specifying any margin changes only the autoscaling; for example, if xmargin is not None, then xmargin times the X data interval will be added to each end of that interval before it is used in autoscaling.  Parameters 
 
*marginsfloat, optional


If a single positional argument is provided, it specifies both margins of the x-axis and y-axis limits. If two positional arguments are provided, they will be interpreted as xmargin, ymargin. If setting the margin on a single axis is desired, use the keyword arguments described below.  
x, yfloat, optional


Specific margin values for the x-axis and y-axis, respectively. These cannot be used with positional arguments, but can be used individually to alter on e.g., only the y-axis.  
tightbool or None, default: True


The tight parameter is passed to autoscale_view(), which is executed after a margin is changed; the default here is True, on the assumption that when margins are specified, no additional padding to match tick marks is usually desired. Set tight to None will preserve the previous setting.    Returns 
 
xmargin, ymarginfloat

   Notes If a previously used Axes method such as pcolor() has set use_sticky_edges to True, only the limits not set by the "sticky artists" will be modified. To force all of the margins to be set, set use_sticky_edges to False before calling margins(). 
  Examples using matplotlib.pyplot.margins
 
   Rotating custom tick labels
matplotlib.pyplot.matshow   matplotlib.pyplot.matshow(A, fignum=None, **kwargs)[source]
 
Display an array as a matrix in a new figure window. The origin is set at the upper left hand corner and rows (first dimension of the array) are displayed horizontally. The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure. Tick labels for the xaxis are placed on top.  Parameters 
 
A2D array-like


The matrix to be displayed.  
fignumNone or int or False


If None, create a new figure window with automatic numbering. If a nonzero integer, draw into the figure with the given number (create it if it does not exist). If 0, use the current axes (or create one if it does not exist).  Note Because of how Axes.matshow tries to set the figure aspect ratio to be the one of the array, strange things may happen if you reuse an existing figure.     Returns 
 AxesImage
  Other Parameters 
 
**kwargsimshow arguments

   
  Examples using matplotlib.pyplot.matshow
 
   Matshow
matplotlib.pyplot.minorticks_off   matplotlib.pyplot.minorticks_off()[source]
 
Remove minor ticks from the Axes.
matplotlib.pyplot.minorticks_on   matplotlib.pyplot.minorticks_on()[source]
 
Display minor ticks on the Axes. Displaying minor ticks may reduce performance; you may turn them off using minorticks_off() if drawing speed is a problem.
matplotlib.pyplot.new_figure_manager   matplotlib.pyplot.new_figure_manager(num, *args, **kwargs)[source]
 
Create a new figure manager instance.
matplotlib.pyplot.nipy_spectral   matplotlib.pyplot.nipy_spectral()[source]
 
Set the colormap to 'nipy_spectral'. 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.pause   matplotlib.pyplot.pause(interval)[source]
 
Run the GUI event loop for interval seconds. If there is an active figure, it will be updated and displayed before the pause, and the GUI event loop (if any) will run during the pause. This can be used for crude animation. For more complex animation use matplotlib.animation. If there is no active figure, sleep for interval seconds instead.  See also  matplotlib.animation

Proper animations  show

Show all figures and optional block until all figures are closed.    
  Examples using matplotlib.pyplot.pause
 
   pyplot animation   

   Rotating a 3D plot   

   Rotating 3D wireframe plot   

   Faster rendering by using blitting
matplotlib.pyplot.pink   matplotlib.pyplot.pink()[source]
 
Set the colormap to 'pink'. 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.plasma   matplotlib.pyplot.plasma()[source]
 
Set the colormap to 'plasma'. 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.polar   matplotlib.pyplot.polar(*args, **kwargs)[source]
 
Make a polar plot. call signature: polar(theta, r, **kwargs)
 Multiple theta, r arguments are supported, with format strings, as in plot. 
  Examples using matplotlib.pyplot.polar
 
   transforms.offset_copy
matplotlib.pyplot.prism   matplotlib.pyplot.prism()[source]
 
Set the colormap to 'prism'. 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.quiverkey   matplotlib.pyplot.quiverkey(Q, X, Y, U, label, **kwargs)[source]
 
Add a key to a quiver plot. The positioning of the key depends on X, Y, coordinates, and labelpos. If labelpos is 'N' or 'S', X, Y give the position of the middle of the key arrow. If labelpos is 'E', X, Y positions the head, and if labelpos is 'W', X, Y positions the tail; in either of these two cases, X, Y is somewhere in the middle of the arrow+label key object.  Parameters 
 
Qmatplotlib.quiver.Quiver


A Quiver object as returned by a call to quiver().  
X, Yfloat


The location of the key.  
Ufloat


The length of the key.  
labelstr


The key label (e.g., length and units of the key).  
anglefloat, default: 0


The angle of the key arrow, in degrees anti-clockwise from the x-axis.  
coordinates{'axes', 'figure', 'data', 'inches'}, default: 'axes'


Coordinate system and units for X, Y: 'axes' and 'figure' are normalized coordinate systems with (0, 0) in the lower left and (1, 1) in the upper right; 'data' are the axes data coordinates (used for the locations of the vectors in the quiver plot itself); 'inches' is position in the figure in inches, with (0, 0) at the lower left corner.  
colorcolor


Overrides face and edge colors from Q.  
labelpos{'N', 'S', 'E', 'W'}


Position the label above, below, to the right, to the left of the arrow, respectively.  
labelsepfloat, default: 0.1


Distance in inches between the arrow and the label.  
labelcolorcolor, default: rcParams["text.color"] (default: 'black')


Label color.  
fontpropertiesdict, optional


A dictionary with keyword arguments accepted by the FontProperties initializer: family, style, variant, size, weight.  **kwargs

Any additional keyword arguments are used to override vector properties taken from Q.
matplotlib.pyplot.rc   matplotlib.pyplot.rc(group, **kwargs)[source]
 
Set the current rcParams. group is the grouping for the rc, e.g., for lines.linewidth the group is lines, for axes.facecolor, the group is axes, and so on. Group may also be a list or tuple of group names, e.g., (xtick, ytick). kwargs is a dictionary attribute name/value pairs, e.g.,: rc('lines', linewidth=2, color='r')
 sets the current rcParams and is equivalent to: rcParams['lines.linewidth'] = 2
rcParams['lines.color'] = 'r'
 The following aliases are available to save typing for interactive users:   
Alias Property   
'lw' 'linewidth'  
'ls' 'linestyle'  
'c' 'color'  
'fc' 'facecolor'  
'ec' 'edgecolor'  
'mew' 'markeredgewidth'  
'aa' 'antialiased'   Thus you could abbreviate the above call as: rc('lines', lw=2, c='r')
 Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows: font = {'family' : 'monospace',
        'weight' : 'bold',
        'size'   : 'larger'}
rc('font', **font)  # pass in the font dict as kwargs
 This enables you to easily switch between several configurations. Use matplotlib.style.use('default') or rcdefaults() to restore the default rcParams after changes. Notes Similar functionality is available by using the normal dict interface, i.e. rcParams.update({"lines.linewidth": 2, ...}) (but rcParams.update does not support abbreviations or grouping). 
  Examples using matplotlib.pyplot.rc
 
   Styling with cycler
matplotlib.pyplot.rc_context   matplotlib.pyplot.rc_context(rc=None, fname=None)[source]
 
Return a context manager for temporarily changing rcParams.  Parameters 
 
rcdict


The rcParams to temporarily set.  
fnamestr or path-like


A file with Matplotlib rc settings. If both fname and rc are given, settings from rc take precedence.      See also  The matplotlibrc file
  Examples Passing explicit values via a dict: with mpl.rc_context({'interactive': False}):
    fig, ax = plt.subplots()
    ax.plot(range(3), range(3))
    fig.savefig('example.png')
    plt.close(fig)
 Loading settings from a file: with mpl.rc_context(fname='print.rc'):
    plt.plot(x, y)  # uses 'print.rc'
 
  Examples using matplotlib.pyplot.rc_context
 
   Style sheets reference   

   Matplotlib logo
matplotlib.pyplot.rcdefaults   matplotlib.pyplot.rcdefaults()[source]
 
Restore the rcParams from Matplotlib's internal default style. Style-blacklisted rcParams (defined in matplotlib.style.core.STYLE_BLACKLIST) are not updated.  See also  matplotlib.rc_file_defaults

Restore the rcParams from the rc file originally loaded by Matplotlib.  matplotlib.style.use

Use a specific style file. Call style.use('default') to restore the default style.    
  Examples using matplotlib.pyplot.rcdefaults
 
   Horizontal bar chart   

   Customize Rc
matplotlib.pyplot.rgrids   matplotlib.pyplot.rgrids(radii=None, labels=None, angle=None, fmt=None, **kwargs)[source]
 
Get or set the radial gridlines on the current polar plot. Call signatures: lines, labels = rgrids()
lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)
 When called with no arguments, rgrids simply returns the tuple (lines, labels). When called with arguments, the labels will appear at the specified radial distances and angle.  Parameters 
 
radiituple with floats


The radii for the radial gridlines  
labelstuple with strings or None


The labels to use at each radial gridline. The matplotlib.ticker.ScalarFormatter will be used if None.  
anglefloat


The angular position of the radius labels in degrees.  
fmtstr or None


Format string used in matplotlib.ticker.FormatStrFormatter. For example '%f'.    Returns 
 
lineslist of lines.Line2D


The radial gridlines.  
labelslist of text.Text


The tick labels.    Other Parameters 
 **kwargs

kwargs are optional Text properties for the labels.      See also  pyplot.thetagrids
projections.polar.PolarAxes.set_rgrids
Axis.get_gridlines
Axis.get_ticklabels
  Examples # set the locations of the radial gridlines
lines, labels = rgrids( (0.25, 0.5, 1.0) )

# set the locations and labels of the radial gridlines
lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' ))
matplotlib.pyplot.sca   matplotlib.pyplot.sca(ax)[source]
 
Set the current Axes to ax and the current Figure to the parent of ax.
matplotlib.pyplot.sci   matplotlib.pyplot.sci(im)[source]
 
Set the current image. This image will be the target of colormap functions like viridis, and other functions such as clim. The current image is an attribute of the current Axes. 
  Examples using matplotlib.pyplot.sci
 
   Line Collection
matplotlib.pyplot.semilogx   matplotlib.pyplot.semilogx(*args, **kwargs)[source]
 
Make a plot with log scaling on the x axis. Call signatures: semilogx([x], y, [fmt], data=None, **kwargs)
semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
 This is just a thin wrapper around plot which additionally changes the x-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters base, subs, and nonpositive control the x-axis properties. They are just forwarded to Axes.set_xscale.  Parameters 
 
basefloat, default: 10


Base of the x logarithm.  
subsarray-like, optional


The location of the minor xticks. If None, reasonable locations are automatically chosen depending on the number of decades in the plot. See Axes.set_xscale for details.  
nonpositive{'mask', 'clip'}, default: 'mask'


Non-positive values in x can be masked as invalid, or clipped to a very small positive number.  **kwargs

All parameters supported by plot.    Returns 
 list of Line2D


Objects representing the plotted data.
matplotlib.pyplot.semilogy   matplotlib.pyplot.semilogy(*args, **kwargs)[source]
 
Make a plot with log scaling on the y axis. Call signatures: semilogy([x], y, [fmt], data=None, **kwargs)
semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
 This is just a thin wrapper around plot which additionally changes the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters base, subs, and nonpositive control the y-axis properties. They are just forwarded to Axes.set_yscale.  Parameters 
 
basefloat, default: 10


Base of the y logarithm.  
subsarray-like, optional


The location of the minor yticks. If None, reasonable locations are automatically chosen depending on the number of decades in the plot. See Axes.set_yscale for details.  
nonpositive{'mask', 'clip'}, default: 'mask'


Non-positive values in y can be masked as invalid, or clipped to a very small positive number.  **kwargs

All parameters supported by plot.    Returns 
 list of Line2D


Objects representing the plotted data.
matplotlib.pyplot.set_cmap   matplotlib.pyplot.set_cmap(cmap)[source]
 
Set the default colormap, and applies it to the current image if any.  Parameters 
 
cmapColormap or str


A colormap instance or the name of a registered colormap.      See also  colormaps
matplotlib.cm.register_cmap
matplotlib.cm.get_cmap
matplotlib.pyplot.set_loglevel   matplotlib.pyplot.set_loglevel(*args, **kwargs)[source]
 
Set Matplotlib's root logger and root logger handler level, creating the handler if it does not exist yet. Typically, one should call set_loglevel("info") or set_loglevel("debug") to get additional debugging information.  Parameters 
 
level{"notset", "debug", "info", "warning", "error", "critical"}


The log level of the handler.     Notes The first time this function is called, an additional handler is attached to Matplotlib's root handler; this handler is reused every time and this function simply manipulates the logger and handler's level.
matplotlib.pyplot.setp   matplotlib.pyplot.setp(obj, *args, **kwargs)[source]
 
Set one or more properties on an Artist, or list allowed values.  Parameters 
 
objArtist or list of Artist


The artist(s) whose properties are being set or queried. When setting properties, all artists are affected; when querying the allowed values, only the first instance in the sequence is queried. For example, two lines can be made thicker and red with a single call: >>> x = arange(0, 1, 0.01)
>>> lines = plot(x, sin(2*pi*x), x, sin(4*pi*x))
>>> setp(lines, linewidth=2, color='r')
  
filefile-like, default: sys.stdout


Where setp writes its output when asked to list allowed values. >>> with open('output.log') as file:
...     setp(line, file=file)
 The default, None, means sys.stdout.  *args, **kwargs

The properties to set. The following combinations are supported:  
Set the linestyle of a line to be dashed: >>> line, = plot([1, 2, 3])
>>> setp(line, linestyle='--')
  
Set multiple properties at once: >>> setp(line, linewidth=2, color='r')
  
List allowed values for a line's linestyle: >>> setp(line, 'linestyle')
linestyle: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
  
List all properties that can be set, and their allowed values: >>> setp(line)
agg_filter: a filter function, ...
[long output listing omitted]
   setp also supports MATLAB style string/value pairs. For example, the following are equivalent: >>> setp(lines, 'linewidth', 2, 'color', 'r')  # MATLAB style
>>> setp(lines, linewidth=2, color='r')        # Python style
      See also  getp
  
  Examples using matplotlib.pyplot.setp
 
   Creating a timeline with lines, dates, and text   

   Contouring the solution space of optimizations   

   Creating annotated heatmaps   

   Boxplots   

   Pie Demo2   

   Labeling a pie and a donut   

   Patheffect Demo   

   Set and get properties   

   TickedStroke patheffect   

   Topographic hillshading   

   Evans test   

   The Lifecycle of a Plot
matplotlib.pyplot.spring   matplotlib.pyplot.spring()[source]
 
Set the colormap to 'spring'. 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.stackplot   matplotlib.pyplot.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.