doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
is_transform_set()[source] Return whether the Artist has an explicitly set transform. This is True after set_transform has been called.
matplotlib.figure_api#matplotlib.figure.FigureBase.is_transform_set
legend(*args, **kwargs)[source] Place a legend on the figure. Call signatures: legend() legend(handles, labels) legend(handles=handles) legend(labels) The call signatures correspond to the following different ways to use this method: 1. Automatic detection of elements to be shown in the legend The elements to be add...
matplotlib.figure_api#matplotlib.figure.FigureBase.legend
pchanged()[source] Call all of the registered callbacks. This function is triggered internally when a property is changed. See also add_callback remove_callback
matplotlib.figure_api#matplotlib.figure.FigureBase.pchanged
pick(mouseevent)[source] Process a pick event. Each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set. See also set_picker, get_picker, pickable
matplotlib.figure_api#matplotlib.figure.FigureBase.pick
pickable()[source] Return whether the artist is pickable. See also set_picker, get_picker, pick
matplotlib.figure_api#matplotlib.figure.FigureBase.pickable
properties()[source] Return a dictionary of all the properties of the artist.
matplotlib.figure_api#matplotlib.figure.FigureBase.properties
remove()[source] Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with FigureCanvasBase.draw_idle. Call relim to update the axes limits if desired. Note: relim will not see collections even if the collection was added to the axes with autolim = True. Not...
matplotlib.figure_api#matplotlib.figure.FigureBase.remove
remove_callback(oid)[source] Remove a callback based on its observer id. See also add_callback
matplotlib.figure_api#matplotlib.figure.FigureBase.remove_callback
sca(a)[source] Set the current Axes to be a and return a.
matplotlib.figure_api#matplotlib.figure.FigureBase.sca
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, frameon=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap...
matplotlib.figure_api#matplotlib.figure.FigureBase.set
set_agg_filter(filter_func)[source] Set the agg filter. Parameters filter_funccallable A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array.
matplotlib.figure_api#matplotlib.figure.FigureBase.set_agg_filter
set_alpha(alpha)[source] Set the alpha value used for blending - not supported on all backends. Parameters alphascalar or None alpha must be within the 0-1 range, inclusive.
matplotlib.figure_api#matplotlib.figure.FigureBase.set_alpha
set_animated(b)[source] Set whether the artist is intended to be used in an animation. If True, the artist is excluded from regular drawing of the figure. You have to call Figure.draw_artist / Axes.draw_artist explicitly on the artist. This appoach is used to speed up animations using blitting. See also matplotlib.an...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_animated
set_clip_box(clipbox)[source] Set the artist's clip Bbox. Parameters clipboxBbox
matplotlib.figure_api#matplotlib.figure.FigureBase.set_clip_box
set_clip_on(b)[source] Set whether the artist uses clipping. When False artists will be visible outside of the axes which can lead to unexpected results. Parameters bbool
matplotlib.figure_api#matplotlib.figure.FigureBase.set_clip_on
set_clip_path(path, transform=None)[source] Set the artist's clip path. Parameters pathPatch or Path or TransformedPath or None The clip path. If given a Path, transform must be provided as well. If None, a previously set clip path is removed. transformTransform, optional Only used if path is a Path, in whi...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_clip_path
set_edgecolor(color)[source] Set the edge color of the Figure rectangle. Parameters colorcolor
matplotlib.figure_api#matplotlib.figure.FigureBase.set_edgecolor
set_facecolor(color)[source] Set the face color of the Figure rectangle. Parameters colorcolor
matplotlib.figure_api#matplotlib.figure.FigureBase.set_facecolor
set_figure(fig)[source] Set the Figure instance the artist belongs to. Parameters figFigure
matplotlib.figure_api#matplotlib.figure.FigureBase.set_figure
set_frameon(b)[source] Set the figure's background patch visibility, i.e. whether the figure background will be drawn. Equivalent to Figure.patch.set_visible(). Parameters bbool
matplotlib.figure_api#matplotlib.figure.FigureBase.set_frameon
set_gid(gid)[source] Set the (group) id for the artist. Parameters gidstr
matplotlib.figure_api#matplotlib.figure.FigureBase.set_gid
set_in_layout(in_layout)[source] Set if artist is to be included in layout calculations, E.g. Constrained Layout Guide, Figure.tight_layout(), and fig.savefig(fname, bbox_inches='tight'). Parameters in_layoutbool
matplotlib.figure_api#matplotlib.figure.FigureBase.set_in_layout
set_label(s)[source] Set a label that will be displayed in the legend. Parameters sobject s will be converted to a string by calling str.
matplotlib.figure_api#matplotlib.figure.FigureBase.set_label
set_linewidth(linewidth)[source] Set the line width of the Figure rectangle. Parameters linewidthnumber
matplotlib.figure_api#matplotlib.figure.FigureBase.set_linewidth
set_path_effects(path_effects)[source] Set the path effects. Parameters path_effectsAbstractPathEffect
matplotlib.figure_api#matplotlib.figure.FigureBase.set_path_effects
set_picker(picker)[source] Define the picking behavior of the artist. Parameters pickerNone or bool or float or callable This can be one of the following: None: Picking is disabled for this artist (default). A boolean: If True then picking will be enabled and the artist will fire a pick event if the mouse eve...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_picker
set_rasterized(rasterized)[source] Force rasterized (bitmap) drawing for vector graphics output. Rasterized drawing is not supported by all artists. If you try to enable this on an artist that does not support it, the command has no effect and a warning will be issued. This setting is ignored for pixel-based output. ...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_rasterized
set_sketch_params(scale=None, length=None, randomness=None)[source] Set the sketch parameters. Parameters scalefloat, optional The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is None, or not provided, no sketch filter will be provided. lengthfloat, optional The length of th...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_sketch_params
set_snap(snap)[source] Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which wo...
matplotlib.figure_api#matplotlib.figure.FigureBase.set_snap
set_transform(t)[source] Set the artist transform. Parameters tTransform
matplotlib.figure_api#matplotlib.figure.FigureBase.set_transform
set_url(url)[source] Set the url for the artist. Parameters urlstr
matplotlib.figure_api#matplotlib.figure.FigureBase.set_url
set_visible(b)[source] Set the artist's visibility. Parameters bbool
matplotlib.figure_api#matplotlib.figure.FigureBase.set_visible
set_zorder(level)[source] Set the zorder for the artist. Artists with lower zorder values are drawn first. Parameters levelfloat
matplotlib.figure_api#matplotlib.figure.FigureBase.set_zorder
subfigures(nrows=1, ncols=1, squeeze=True, wspace=None, hspace=None, width_ratios=None, height_ratios=None, **kwargs)[source] Add a subfigure to this figure or subfigure. A subfigure has the same artist methods as a figure, and is logically the same as a figure, but cannot print itself. See Figure subfigures. Parame...
matplotlib.figure_api#matplotlib.figure.FigureBase.subfigures
subplot_mosaic(mosaic, *, sharex=False, sharey=False, subplot_kw=None, gridspec_kw=None, empty_sentinel='.')[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 ...
matplotlib.figure_api#matplotlib.figure.FigureBase.subplot_mosaic
subplots(nrows=1, ncols=1, *, sharex=False, sharey=False, squeeze=True, subplot_kw=None, gridspec_kw=None)[source] Add a set of subplots to this figure. This utility wrapper makes it convenient to create common layouts of subplots in a single call. Parameters nrows, ncolsint, default: 1 Number of rows/columns o...
matplotlib.figure_api#matplotlib.figure.FigureBase.subplots
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,...
matplotlib.figure_api#matplotlib.figure.FigureBase.subplots_adjust
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'}, def...
matplotlib.figure_api#matplotlib.figure.FigureBase.suptitle
supxlabel(t, **kwargs)[source] Add a centered supxlabel to the figure. Parameters tstr The supxlabel text. xfloat, default: 0.5 The x location of the text in figure coordinates. yfloat, default: 0.01 The y location of the text in figure coordinates. horizontalalignment, ha{'center', 'left', 'right'}, ...
matplotlib.figure_api#matplotlib.figure.FigureBase.supxlabel
supylabel(t, **kwargs)[source] Add a centered supylabel to the figure. Parameters tstr The supylabel text. xfloat, default: 0.02 The x location of the text in figure coordinates. yfloat, default: 0.5 The y location of the text in figure coordinates. horizontalalignment, ha{'center', 'left', 'right'}, ...
matplotlib.figure_api#matplotlib.figure.FigureBase.supylabel
text(x, y, s, fontdict=None, **kwargs)[source] Add text to figure. Parameters x, yfloat The position to place the text. By default, this is in figure coordinates, floats in [0, 1]. The coordinate system can be changed using the transform keyword. sstr The text string. fontdictdict, optional A dictionary...
matplotlib.figure_api#matplotlib.figure.FigureBase.text
update(props)[source] Update this artist's properties from the dict props. Parameters propsdict
matplotlib.figure_api#matplotlib.figure.FigureBase.update
update_from(other)[source] Copy properties from other to self.
matplotlib.figure_api#matplotlib.figure.FigureBase.update_from
zorder=0
matplotlib.figure_api#matplotlib.figure.FigureBase.zorder
classmatplotlib.figure.SubFigure(parent, subplotspec, *, facecolor=None, edgecolor=None, linewidth=0.0, frameon=None, **kwargs)[source] Logical figure that can be placed inside a figure. Typically instantiated using Figure.add_subfigure or SubFigure.add_subfigure, or SubFigure.subfigures. A subfigure has the same met...
matplotlib.figure_api#matplotlib.figure.SubFigure
add_artist(artist, clip=False)[source] Add an Artist to the figure. Usually artists are added to Axes objects using Axes.add_artist; this method can be used in the rare cases where one needs to add artists directly to the figure instead. Parameters artistArtist The artist to add to the figure. If the added arti...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_artist
add_axes(*args, **kwargs)[source] Add an Axes to the figure. Call signatures: add_axes(rect, projection=None, polar=False, **kwargs) add_axes(ax) Parameters rectsequence of float The dimensions [left, bottom, width, height] of the new Axes. All quantities are in fractions of figure width and height. projecti...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_axes
add_callback(func)[source] Add a callback function that will be called whenever one of the Artist's properties changes. Parameters funccallable The callback function. It must have the signature: def func(artist: Artist) -> Any where artist is the calling Artist. Return values may exist but are ignored. Retu...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_callback
add_gridspec(nrows=1, ncols=1, **kwargs)[source] Return a GridSpec that has this figure as a parent. This allows complex layout of Axes in the figure. Parameters nrowsint, default: 1 Number of rows in grid. ncolsint, default: 1 Number or columns in grid. Returns GridSpec Other Parameters **kwargs ...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_gridspec
add_subfigure(subplotspec, **kwargs)[source] Add a SubFigure to the figure as part of a subplot arrangement. Parameters subplotspecgridspec.SubplotSpec Defines the region in a parent gridspec where the subfigure will be placed. Returns figure.SubFigure Other Parameters **kwargs Are passed to the SubFi...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_subfigure
add_subplot(*args, **kwargs)[source] Add an Axes to the figure as part of a subplot arrangement. Call signatures: add_subplot(nrows, ncols, index, **kwargs) add_subplot(pos, **kwargs) add_subplot(ax) add_subplot() Parameters *argsint, (int, int, index), or SubplotSpec, default: (1, 1, 1) The position of the su...
matplotlib.figure_api#matplotlib.figure.SubFigure.add_subplot
align_labels(axs=None)[source] Align the xlabels and ylabels of subplots with the same subplots row or column (respectively) if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. Parameters axslist of Axes Optional ...
matplotlib.figure_api#matplotlib.figure.SubFigure.align_labels
align_xlabels(axs=None)[source] Align the xlabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. If a label is on the bottom, it is aligned with labels on Axes that also have ...
matplotlib.figure_api#matplotlib.figure.SubFigure.align_xlabels
align_ylabels(axs=None)[source] Align the ylabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. If a label is on the left, it is aligned with labels on Axes that also have th...
matplotlib.figure_api#matplotlib.figure.SubFigure.align_ylabels
autofmt_xdate(bottom=0.2, rotation=30, ha='right', which='major')[source] Date ticklabels often overlap, so it is useful to rotate them and right align them. Also, a common use case is a number of subplots with shared x-axis where the x-axis is date data. The ticklabels are often long, and it helps to rotate them on ...
matplotlib.figure_api#matplotlib.figure.SubFigure.autofmt_xdate
colorbar(mappable, cax=None, ax=None, use_gridspec=True, **kw)[source] Add a colorbar to a plot. Parameters mappable The matplotlib.cm.ScalarMappable (i.e., AxesImage, ContourSet, etc.) described by this colorbar. This argument is mandatory for the Figure.colorbar method but optional for the pyplot.colorbar funct...
matplotlib.figure_api#matplotlib.figure.SubFigure.colorbar
contains(mouseevent)[source] Test whether the mouse event occurred on the figure. Returns bool, {}
matplotlib.figure_api#matplotlib.figure.SubFigure.contains
convert_xunits(x)[source] Convert x using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, x itself is returned.
matplotlib.figure_api#matplotlib.figure.SubFigure.convert_xunits
convert_yunits(y)[source] Convert y using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, y itself is returned.
matplotlib.figure_api#matplotlib.figure.SubFigure.convert_yunits
delaxes(ax)[source] Remove the Axes ax from the figure; update the current Axes.
matplotlib.figure_api#matplotlib.figure.SubFigure.delaxes
draw(renderer)[source] Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False). Parameters rendererRendererBase subclass. Notes This method is overridden in the Artist subclasses.
matplotlib.figure_api#matplotlib.figure.SubFigure.draw
findobj(match=None, include_self=True)[source] Find artist objects. Recursively find all Artist instances contained in the artist. Parameters match A filter criterion for the matches. This can be None: Return all objects contained in artist. A function with signature def match(artist: Artist) -> bool. The resul...
matplotlib.figure_api#matplotlib.figure.SubFigure.findobj
format_cursor_data(data)[source] Return a string representation of data. Note This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. The default implementation converts ints and floats and arrays of ints and floats into a comma...
matplotlib.figure_api#matplotlib.figure.SubFigure.format_cursor_data
gca(**kwargs)[source] Get the current Axes. If there is currently no Axes on this Figure, a new one is created using Figure.add_subplot. (To test whether there is currently an Axes on a Figure, check whether figure.axes is empty. To test whether there is currently a Figure on the pyplot figure stack, check whether py...
matplotlib.figure_api#matplotlib.figure.SubFigure.gca
get_agg_filter()[source] Return filter function to be used for agg filter.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_agg_filter
get_alpha()[source] Return the alpha value used for blending - not supported on all backends.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_alpha
get_animated()[source] Return whether the artist is animated.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_animated
get_axes()[source] List of Axes in the SubFigure. You can access and modify the Axes in the SubFigure through this list. Do not modify the list itself. Instead, use add_axes, add_subplot or delaxes to add or remove an Axes. Note: The SubFigure.axes property and get_axes method are equivalent.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_axes
get_children()[source] Get a list of artists contained in the figure.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_children
get_clip_box()[source] Return the clipbox.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_clip_box
get_clip_on()[source] Return whether the artist uses clipping.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_clip_on
get_clip_path()[source] Return the clip path.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_clip_path
get_constrained_layout()[source] Return whether constrained layout is being used. See Constrained Layout Guide.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_constrained_layout
get_constrained_layout_pads(relative=False)[source] Get padding for constrained_layout. Returns a list of w_pad, h_pad in inches and wspace and hspace as fractions of the subplot. See Constrained Layout Guide. Parameters relativebool If True, then convert from inches to figure relative.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_constrained_layout_pads
get_cursor_data(event)[source] Return the cursor data for a given event. Note This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. Cursor data can be used by Artists to provide additional context information for a given event...
matplotlib.figure_api#matplotlib.figure.SubFigure.get_cursor_data
get_default_bbox_extra_artists()[source]
matplotlib.figure_api#matplotlib.figure.SubFigure.get_default_bbox_extra_artists
get_edgecolor()[source] Get the edge color of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_edgecolor
get_facecolor()[source] Get the face color of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_facecolor
get_figure()[source] Return the Figure instance the artist belongs to.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_figure
get_frameon()[source] Return the figure's background patch visibility, i.e. whether the figure background will be drawn. Equivalent to Figure.patch.get_visible().
matplotlib.figure_api#matplotlib.figure.SubFigure.get_frameon
get_gid()[source] Return the group id.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_gid
get_in_layout()[source] Return boolean flag, True if artist is included in layout calculations. E.g. Constrained Layout Guide, Figure.tight_layout(), and fig.savefig(fname, bbox_inches='tight').
matplotlib.figure_api#matplotlib.figure.SubFigure.get_in_layout
get_label()[source] Return the label used for this artist in the legend.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_label
get_linewidth()[source] Get the line width of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_linewidth
get_path_effects()[source]
matplotlib.figure_api#matplotlib.figure.SubFigure.get_path_effects
get_picker()[source] Return the picking behavior of the artist. The possible values are described in set_picker. See also set_picker, pickable, pick
matplotlib.figure_api#matplotlib.figure.SubFigure.get_picker
get_rasterized()[source] Return whether the artist is to be rasterized.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_rasterized
get_sketch_params()[source] Return the sketch parameters for the artist. Returns tuple or None A 3-tuple with the following elements: scale: The amplitude of the wiggle perpendicular to the source line. length: The length of the wiggle along the line. randomness: The scale factor by which the length is shrunk...
matplotlib.figure_api#matplotlib.figure.SubFigure.get_sketch_params
get_snap()[source] Return the snap setting. See set_snap for details.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_snap
get_tightbbox(renderer, bbox_extra_artists=None)[source] Return a (tight) bounding box of the figure in inches. Note that FigureBase differs from all other artists, which return their Bbox in pixels. Artists that have artist.set_in_layout(False) are not included in the bbox. Parameters rendererRendererBase subcla...
matplotlib.figure_api#matplotlib.figure.SubFigure.get_tightbbox
get_transform()[source] Return the Transform instance used by this artist.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_transform
get_transformed_clip_path_and_affine()[source] Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_transformed_clip_path_and_affine
get_url()[source] Return the url.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_url
get_visible()[source] Return the visibility.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_visible
get_window_extent(*args, **kwargs)[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 ...
matplotlib.figure_api#matplotlib.figure.SubFigure.get_window_extent
get_zorder()[source] Return the artist's zorder.
matplotlib.figure_api#matplotlib.figure.SubFigure.get_zorder
have_units()[source] Return whether units are set on any axis.
matplotlib.figure_api#matplotlib.figure.SubFigure.have_units
is_transform_set()[source] Return whether the Artist has an explicitly set transform. This is True after set_transform has been called.
matplotlib.figure_api#matplotlib.figure.SubFigure.is_transform_set
legend(*args, **kwargs)[source] Place a legend on the figure. Call signatures: legend() legend(handles, labels) legend(handles=handles) legend(labels) The call signatures correspond to the following different ways to use this method: 1. Automatic detection of elements to be shown in the legend The elements to be add...
matplotlib.figure_api#matplotlib.figure.SubFigure.legend
pchanged()[source] Call all of the registered callbacks. This function is triggered internally when a property is changed. See also add_callback remove_callback
matplotlib.figure_api#matplotlib.figure.SubFigure.pchanged