neulab/docprompting-conala huggingface dataset:
matplotlib.font_manager.list_fonts(directory, extensions)[source]
 
Return a list of all fonts matching any of the extensions, found recursively under the directory.
matplotlib.font_manager.ttfFontProperty(font)[source]
 
Extract information from a TrueType font file.  Parameters 
 
fontFT2Font


The TrueType font file from which information will be extracted.    Returns 
 FontEntry

The extracted font properties.
matplotlib.font_manager.win32FontDirectory()[source]
 
Return the user-specified font directory for Win32. This is looked up from the registry key \\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Fonts
 If the key is not found, %WINDIR%\Fonts will be returned.
matplotlib.font_manager.win32InstalledFonts(directory=None, fontext='ttf')[source]
 
[Deprecated] Search for fonts in the specified font directory, or use the system directories if none given. Additionally, it is searched for user fonts installed. A list of TrueType font filenames are returned by default, or AFM fonts if fontext == 'afm'. Notes  Deprecated since version 3.5.
matplotlib.fontconfig_pattern A module for parsing and generating fontconfig patterns.   classmatplotlib.fontconfig_pattern.FontconfigPatternParser[source]
 
Bases: object A simple pyparsing-based parser for fontconfig patterns.   parse(pattern)[source]
 
Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object. 
 
   matplotlib.fontconfig_pattern.family_escape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. 
   matplotlib.fontconfig_pattern.family_unescape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. 
   matplotlib.fontconfig_pattern.generate_fontconfig_pattern(d)[source]
 
Given a dictionary of key/value pairs, generates a fontconfig pattern string. 
   matplotlib.fontconfig_pattern.parse_fontconfig_pattern(pattern)[source]
 
Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object. 
   matplotlib.fontconfig_pattern.value_escape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. 
   matplotlib.fontconfig_pattern.value_unescape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.fontconfig_pattern.family_escape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.fontconfig_pattern.family_unescape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
classmatplotlib.fontconfig_pattern.FontconfigPatternParser[source]
 
Bases: object A simple pyparsing-based parser for fontconfig patterns.   parse(pattern)[source]
 
Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object.
parse(pattern)[source]
 
Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object.
matplotlib.fontconfig_pattern.generate_fontconfig_pattern(d)[source]
 
Given a dictionary of key/value pairs, generates a fontconfig pattern string.
matplotlib.fontconfig_pattern.parse_fontconfig_pattern(pattern)[source]
 
Parse the given fontconfig pattern and return a dictionary of key/value pairs useful for initializing a font_manager.FontProperties object.
matplotlib.fontconfig_pattern.value_escape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.fontconfig_pattern.value_unescape(/, repl, string, count=0)
 
Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
matplotlib.get_backend()[source]
 
Return the name of the current backend.  See also  matplotlib.use
matplotlib.get_cachedir()[source]
 
Return the string path of the cache directory. The procedure used to find the directory is the same as for _get_config_dir, except using $XDG_CACHE_HOME/$HOME/.cache instead.
matplotlib.get_configdir()[source]
 
Return the string path of the configuration directory. The directory is chosen as follows:  If the MPLCONFIGDIR environment variable is supplied, choose that. On Linux, follow the XDG specification and look first in $XDG_CONFIG_HOME, if defined, or $HOME/.config. On other platforms, choose $HOME/.matplotlib. If the chosen directory exists and is writable, use that as the configuration directory. Else, create a temporary directory, and use it as the configuration directory.
matplotlib.get_data_path()[source]
 
Return the path to Matplotlib data.
matplotlib.gridspec gridspec contains classes that help to layout multiple Axes in a grid-like pattern within a figure. The GridSpec specifies the overall grid structure. Individual cells within the grid are referenced by SubplotSpecs. Often, users need not access this module directly, and can use higher-level methods like subplots, subplot_mosaic and subfigures. See the tutorial Arranging multiple Axes in a Figure for a guide.  Classes  
GridSpec(nrows, ncols[, figure, left, ...]) A grid layout to place subplots within a figure.  
SubplotSpec(gridspec, num1[, num2]) The location of a subplot in a GridSpec.  
GridSpecBase(nrows, ncols[, height_ratios, ...]) A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed.  
GridSpecFromSubplotSpec(nrows, ncols, ...[, ...]) GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec.
get_subplot_params(figure=None)[source]
 
Return the SubplotParams for the GridSpec. In order of precedence the values are taken from  non-None attributes of the GridSpec the provided figure
 rcParams["figure.subplot.*"]
locally_modified_subplot_params()[source]
 
Return a list of the names of the subplot parameters explicitly set in the GridSpec. This is a subset of the attributes of SubplotParams.
tight_layout(figure, renderer=None, pad=1.08, h_pad=None, w_pad=None, rect=None)[source]
 
Adjust subplot parameters to give specified padding.  Parameters 
 
padfloat


Padding between the figure edge and the edges of subplots, as a fraction of the font-size.  
h_pad, w_padfloat, optional


Padding (height/width) between edges of adjacent subplots. Defaults to pad.  
recttuple of 4 floats, default: (0, 0, 1, 1), i.e. the whole figure


(left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into.
update(**kwargs)[source]
 
Update the subplot parameters of the grid. Parameters that are not explicitly given are not changed. Setting a parameter to None resets it to rcParams["figure.subplot.*"].  Parameters 
 
left, right, top, bottomfloat or None, optional


Extent of the subplots as a fraction of figure width or height.  
wspace, hspacefloat, optional


Spacing between the subplots as a fraction of the average subplot width / height.
matplotlib.gridspec.GridSpecBase   classmatplotlib.gridspec.GridSpecBase(nrows, ncols, height_ratios=None, width_ratios=None)[source]
 
Bases: object A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed.  Parameters 
 
nrows, ncolsint


The number of rows and columns of the grid.  
width_ratiosarray-like of length ncols, optional


Defines the relative widths of the columns. Each column gets a relative width of width_ratios[i] / sum(width_ratios). If not given, all columns will have the same width.  
height_ratiosarray-like of length nrows, optional


Defines the relative heights of the rows. Each row gets a relative height of height_ratios[i] / sum(height_ratios). If not given, all rows will have the same height.       get_geometry()[source]
 
Return a tuple containing the number of rows and columns in the grid. 
   get_grid_positions(fig, raw=False)[source]
 
Return the positions of the grid cells in figure coordinates.  Parameters 
 
figFigure


The figure the grid should be applied to. The subplot parameters (margins and spacing between subplots) are taken from fig.  
rawbool, default: False


If True, the subplot parameters of the figure are not taken into account. The grid spans the range [0, 1] in both directions without margins and there is no space between grid cells. This is used for constrained_layout.    Returns 
 
bottoms, tops, lefts, rightsarray


The bottom, top, left, right positions of the grid cells in figure coordinates.     
   get_height_ratios()[source]
 
Return the height ratios. This is None if no height ratios have been set explicitly. 
   get_subplot_params(figure=None)[source]

   get_width_ratios()[source]
 
Return the width ratios. This is None if no width ratios have been set explicitly. 
   propertyncols
 
The number of columns in the grid. 
   new_subplotspec(loc, rowspan=1, colspan=1)[source]
 
Create and return a SubplotSpec instance.  Parameters 
 
loc(int, int)


The position of the subplot in the grid as (row_index, column_index).  
rowspan, colspanint, default: 1


The number of rows and columns the subplot should span in the grid.     
   propertynrows
 
The number of rows in the grid. 
   set_height_ratios(height_ratios)[source]
 
Set the relative heights of the rows. height_ratios must be of length nrows. Each row gets a relative height of height_ratios[i] / sum(height_ratios). 
   set_width_ratios(width_ratios)[source]
 
Set the relative widths of the columns. width_ratios must be of length ncols. Each column gets a relative width of width_ratios[i] / sum(width_ratios). 
   subplots(*, sharex=False, sharey=False, squeeze=True, subplot_kw=None)[source]
 
Add all subplots specified by this GridSpec to its parent figure. See Figure.subplots for detailed documentation. 
 
  Examples using matplotlib.gridspec.GridSpecBase
 
   Psd Demo   

   Streamplot   

   Aligning Labels   

   Resizing axes with constrained layout   

   Using Gridspec to make multi-column/row subplot layouts   

   Nested Gridspecs   

   GridSpec demo   

   Constrained Layout Guide   

   Tight Layout guide   

   origin and extent in imshow
get_geometry()[source]
 
Return a tuple containing the number of rows and columns in the grid.
get_grid_positions(fig, raw=False)[source]
 
Return the positions of the grid cells in figure coordinates.  Parameters 
 
figFigure


The figure the grid should be applied to. The subplot parameters (margins and spacing between subplots) are taken from fig.  
rawbool, default: False


If True, the subplot parameters of the figure are not taken into account. The grid spans the range [0, 1] in both directions without margins and there is no space between grid cells. This is used for constrained_layout.    Returns 
 
bottoms, tops, lefts, rightsarray


The bottom, top, left, right positions of the grid cells in figure coordinates.
get_height_ratios()[source]
 
Return the height ratios. This is None if no height ratios have been set explicitly.
get_width_ratios()[source]
 
Return the width ratios. This is None if no width ratios have been set explicitly.
new_subplotspec(loc, rowspan=1, colspan=1)[source]
 
Create and return a SubplotSpec instance.  Parameters 
 
loc(int, int)


The position of the subplot in the grid as (row_index, column_index).  
rowspan, colspanint, default: 1


The number of rows and columns the subplot should span in the grid.
set_height_ratios(height_ratios)[source]
 
Set the relative heights of the rows. height_ratios must be of length nrows. Each row gets a relative height of height_ratios[i] / sum(height_ratios).
set_width_ratios(width_ratios)[source]
 
Set the relative widths of the columns. width_ratios must be of length ncols. Each column gets a relative width of width_ratios[i] / sum(width_ratios).
subplots(*, sharex=False, sharey=False, squeeze=True, subplot_kw=None)[source]
 
Add all subplots specified by this GridSpec to its parent figure. See Figure.subplots for detailed documentation.
matplotlib.gridspec.GridSpecFromSubplotSpec   classmatplotlib.gridspec.GridSpecFromSubplotSpec(nrows, ncols, subplot_spec, wspace=None, hspace=None, height_ratios=None, width_ratios=None)[source]
 
Bases: matplotlib.gridspec.GridSpecBase GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec.  Parameters 
 
nrows, ncolsint


Number of rows and number of columns of the grid.  
subplot_specSubplotSpec


Spec from which the layout parameters are inherited.  
wspace, hspacefloat, optional


See GridSpec for more details. If not specified default values (from the figure or rcParams) are used.  
height_ratiosarray-like of length nrows, optional


See GridSpecBase for details.  
width_ratiosarray-like of length ncols, optional


See GridSpecBase for details.       get_subplot_params(figure=None)[source]
 
Return a dictionary of subplot layout parameters. 
   get_topmost_subplotspec()[source]
 
Return the topmost SubplotSpec instance associated with the subplot. 
 
  Examples using matplotlib.gridspec.GridSpecFromSubplotSpec
 
   Resizing axes with constrained layout   

   Nested Gridspecs   

   Nested GridSpecs   

   Constrained Layout Guide   

   Arranging multiple Axes in a Figure
get_subplot_params(figure=None)[source]
 
Return a dictionary of subplot layout parameters.
get_topmost_subplotspec()[source]
 
Return the topmost SubplotSpec instance associated with the subplot.
matplotlib.gridspec.SubplotSpec   classmatplotlib.gridspec.SubplotSpec(gridspec, num1, num2=None)[source]
 
Bases: object The location of a subplot in a GridSpec.  Note Likely, you'll never instantiate a SubplotSpec yourself. Instead you will typically obtain one from a GridSpec using item-access.   Parameters 
 
gridspecGridSpec


The GridSpec, which the subplot is referencing.  
num1, num2int


The subplot will occupy the num1-th cell of the given gridspec. If num2 is provided, the subplot will span between num1-th cell and num2-th cell inclusive. The index starts from 0.       propertycolspan
 
The columns spanned by this subplot, as a range object. 
   get_geometry()[source]
 
Return the subplot geometry as tuple (n_rows, n_cols, start, stop). The indices start and stop define the range of the subplot within the GridSpec. stop is inclusive (i.e. for a single cell start == stop). 
   get_gridspec()[source]

   get_position(figure, return_all=<deprecated parameter>)[source]
 
Update the subplot position from figure.subplotpars. 
   get_topmost_subplotspec()[source]
 
Return the topmost SubplotSpec instance associated with the subplot. 
   is_first_col()[source]

   is_first_row()[source]

   is_last_col()[source]

   is_last_row()[source]

   propertynum2

   propertyrowspan
 
The rows spanned by this subplot, as a range object. 
   subgridspec(nrows, ncols, **kwargs)[source]
 
Create a GridSpec within this subplot. The created GridSpecFromSubplotSpec will have this SubplotSpec as a parent.  Parameters 
 
nrowsint


Number of rows in grid.  
ncolsint


Number or columns in grid.    Returns 
 GridSpecFromSubplotSpec
  Other Parameters 
 **kwargs

All other parameters are passed to GridSpecFromSubplotSpec.      See also  matplotlib.pyplot.subplots
  Examples Adding three subplots in the space occupied by a single subplot: fig = plt.figure()
gs0 = fig.add_gridspec(3, 1)
ax1 = fig.add_subplot(gs0[0])
ax2 = fig.add_subplot(gs0[1])
gssub = gs0[2].subgridspec(1, 3)
for i in range(3):
    fig.add_subplot(gssub[0, i])
 
 
  Examples using matplotlib.gridspec.SubplotSpec
 
   Nested GridSpecs   

   Constrained Layout Guide   

   Arranging multiple Axes in a Figure
get_geometry()[source]
 
Return the subplot geometry as tuple (n_rows, n_cols, start, stop). The indices start and stop define the range of the subplot within the GridSpec. stop is inclusive (i.e. for a single cell start == stop).
get_position(figure, return_all=<deprecated parameter>)[source]
 
Update the subplot position from figure.subplotpars.
subgridspec(nrows, ncols, **kwargs)[source]
 
Create a GridSpec within this subplot. The created GridSpecFromSubplotSpec will have this SubplotSpec as a parent.  Parameters 
 
nrowsint


Number of rows in grid.  
ncolsint


Number or columns in grid.    Returns 
 GridSpecFromSubplotSpec
  Other Parameters 
 **kwargs

All other parameters are passed to GridSpecFromSubplotSpec.      See also  matplotlib.pyplot.subplots
  Examples Adding three subplots in the space occupied by a single subplot: fig = plt.figure()
gs0 = fig.add_gridspec(3, 1)
ax1 = fig.add_subplot(gs0[0])
ax2 = fig.add_subplot(gs0[1])
gssub = gs0[2].subgridspec(1, 3)
for i in range(3):
    fig.add_subplot(gssub[0, i])
get_cursor_data(event)[source]
 
Return the image value at the event position or None if the event is outside the image.  See also  matplotlib.artist.Artist.get_cursor_data
get_extent()[source]
 
Return the image extent as tuple (left, right, bottom, top).
get_window_extent(renderer=None)[source]
 
Get the artist's bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly.
make_image(renderer, magnification=1.0, unsampled=False)[source]
 
Normalize, rescale, and colormap this image's data for rendering using renderer, with the given magnification. If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead.  Returns 
 
image(M, N, 4) uint8 array


The RGBA image, resampled unless unsampled is True.  
x, yfloat


The upper left corner where the image should be drawn, in pixel space.  
transAffine2D


The affine transformation from image to pixel space.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array array-like  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap Colormap or str or None  
data array-like or PIL.Image.Image  
extent 4-tuple of float  
figure Figure  
filternorm bool  
filterrad positive float  
gid str  
in_layout bool  
interpolation {'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm Normalize or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
set_extent(extent)[source]
 
Set the image extent.  Parameters 
 
extent4-tuple of float


The position and size of the image as tuple (left, right, bottom, top) in data coordinates.     Notes This updates ax.dataLim, and, if autoscaling, sets ax.viewLim to tightly fit the image, regardless of dataLim. Autoscaling state is not changed, so following this with ax.autoscale_view() will redo the autoscaling in accord with dataLim.
contains(mouseevent)[source]
 
Test whether the mouse event occurred within the image.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
 
Set multiple properties at once. Supported properties are   
Property Description   
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array  
alpha float or 2D array-like or None  
animated bool  
array array-like  
clim (vmin: float, vmax: float)  
clip_box Bbox  
clip_on bool  
clip_path Patch or (Path, Transform) or None  
cmap Colormap or str or None  
data array-like or PIL.Image.Image  
figure Figure  
filternorm bool  
filterrad positive float  
gid str  
in_layout bool  
interpolation {'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None  
interpolation_stage {'data', 'rgba'} or None  
label object  
norm Normalize or None  
path_effects AbstractPathEffect  
picker None or bool or float or callable  
rasterized bool  
resample bool or None  
sketch_params (scale: float, length: float, randomness: float)  
snap bool or None  
transform Transform  
url str  
visible bool  
zorder float
matplotlib.image.composite_images(images, renderer, magnification=1.0)[source]
 
Composite a number of RGBA images into one. The images are composited in the order in which they appear in the images list.  Parameters 
 
imageslist of Images


Each must have a make_image method. For each image, can_composite should return True, though this is not enforced by this function. Each image must have a purely affine transformation with no shear.  
rendererRendererBase


magnificationfloat, default: 1


The additional magnification to apply for the renderer in use.    Returns 
 
imageuint8 array (M, N, 4)


The composited RGBA image.  
offset_x, offset_yfloat


The (left, bottom) offset where the composited image should be placed in the output figure.