doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.Figure.remove
remove_callback(oid)[source] Remove a callback based on its observer id. See also add_callback
matplotlib.figure_api#matplotlib.figure.Figure.remove_callback
savefig(fname, *, transparent=None, **kwargs)[source] Save the current figure. Call signature: savefig(fname, *, dpi='figure', format=None, metadata=None, bbox_inches=None, pad_inches=0.1, facecolor='auto', edgecolor='auto', backend=None, **kwargs ) The available output formats depend ...
matplotlib.figure_api#matplotlib.figure.Figure.savefig
sca(a)[source] Set the current Axes to be a and return a.
matplotlib.figure_api#matplotlib.figure.Figure.sca
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, canvas=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, constrained_layout=<UNSET>, constrained_layout_pads=<UNSET>, dpi=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, figheight=<UNSET>, figwidth=<UNSET>, frameon=<UNSET>, gid=<UNSET>, in_layout=<...
matplotlib.figure_api#matplotlib.figure.Figure.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.Figure.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.Figure.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.Figure.set_animated
set_canvas(canvas)[source] Set the canvas that contains the figure Parameters canvasFigureCanvas
matplotlib.figure_api#matplotlib.figure.Figure.set_canvas
set_clip_box(clipbox)[source] Set the artist's clip Bbox. Parameters clipboxBbox
matplotlib.figure_api#matplotlib.figure.Figure.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.Figure.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.Figure.set_clip_path
set_constrained_layout(constrained)[source] Set whether constrained_layout is used upon drawing. If None, rcParams["figure.constrained_layout.use"] (default: False) value will be used. When providing a dict containing the keys w_pad, h_pad the default constrained_layout paddings will be overridden. These pads are in ...
matplotlib.figure_api#matplotlib.figure.Figure.set_constrained_layout
set_constrained_layout_pads(*, w_pad=None, h_pad=None, wspace=None, hspace=None)[source] Set padding for constrained_layout. Tip: The parameters can be passed from a dictionary by using fig.set_constrained_layout(**pad_dict). See Constrained Layout Guide. Parameters w_padfloat, default: rcParams["figure.constrain...
matplotlib.figure_api#matplotlib.figure.Figure.set_constrained_layout_pads
set_dpi(val)[source] Set the resolution of the figure in dots-per-inch. Parameters valfloat
matplotlib.figure_api#matplotlib.figure.Figure.set_dpi
set_edgecolor(color)[source] Set the edge color of the Figure rectangle. Parameters colorcolor
matplotlib.figure_api#matplotlib.figure.Figure.set_edgecolor
set_facecolor(color)[source] Set the face color of the Figure rectangle. Parameters colorcolor
matplotlib.figure_api#matplotlib.figure.Figure.set_facecolor
set_figheight(val, forward=True)[source] Set the height of the figure in inches. Parameters valfloat forwardbool See set_size_inches. See also matplotlib.figure.Figure.set_figwidth matplotlib.figure.Figure.set_size_inches
matplotlib.figure_api#matplotlib.figure.Figure.set_figheight
set_figure(fig)[source] Set the Figure instance the artist belongs to. Parameters figFigure
matplotlib.figure_api#matplotlib.figure.Figure.set_figure
set_figwidth(val, forward=True)[source] Set the width of the figure in inches. Parameters valfloat forwardbool See set_size_inches. See also matplotlib.figure.Figure.set_figheight matplotlib.figure.Figure.set_size_inches
matplotlib.figure_api#matplotlib.figure.Figure.set_figwidth
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.Figure.set_frameon
set_gid(gid)[source] Set the (group) id for the artist. Parameters gidstr
matplotlib.figure_api#matplotlib.figure.Figure.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.Figure.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.Figure.set_label
set_linewidth(linewidth)[source] Set the line width of the Figure rectangle. Parameters linewidthnumber
matplotlib.figure_api#matplotlib.figure.Figure.set_linewidth
set_path_effects(path_effects)[source] Set the path effects. Parameters path_effectsAbstractPathEffect
matplotlib.figure_api#matplotlib.figure.Figure.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.Figure.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.Figure.set_rasterized
set_size_inches(w, h=None, forward=True)[source] Set the figure size in inches. Call signatures: fig.set_size_inches(w, h) # OR fig.set_size_inches((w, h)) Parameters w(float, float) or float Width and height in inches (if height not specified as a separate argument) or width. hfloat Height in inches. f...
matplotlib.figure_api#matplotlib.figure.Figure.set_size_inches
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.Figure.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.Figure.set_snap
set_tight_layout(tight)[source] Set whether and how tight_layout is called when drawing. Parameters tightbool or dict with keys "pad", "w_pad", "h_pad", "rect" or None If a bool, sets whether to call tight_layout upon drawing. If None, use rcParams["figure.autolayout"] (default: False) instead. If a dict, pass ...
matplotlib.figure_api#matplotlib.figure.Figure.set_tight_layout
set_transform(t)[source] Set the artist transform. Parameters tTransform
matplotlib.figure_api#matplotlib.figure.Figure.set_transform
set_url(url)[source] Set the url for the artist. Parameters urlstr
matplotlib.figure_api#matplotlib.figure.Figure.set_url
set_visible(b)[source] Set the artist's visibility. Parameters bbool
matplotlib.figure_api#matplotlib.figure.Figure.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.Figure.set_zorder
show(warn=True)[source] If using a GUI backend with pyplot, display the figure window. If the figure was not created using figure, it will lack a FigureManagerBase, and this method will raise an AttributeError. Warning This does not manage an GUI event loop. Consequently, the figure may only be shown briefly or not ...
matplotlib.figure_api#matplotlib.figure.Figure.show
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.Figure.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.Figure.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.Figure.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.Figure.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.Figure.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.Figure.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.Figure.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.Figure.text
tight_layout(*, pad=1.08, h_pad=None, w_pad=None, rect=None)[source] Adjust the padding between and around subplots. To exclude an artist on the Axes from the bounding box calculation that determines the subplot parameters (i.e. legend, or annotation), set a.set_in_layout(False) for that artist. Parameters padflo...
matplotlib.figure_api#matplotlib.figure.Figure.tight_layout
update(props)[source] Update this artist's properties from the dict props. Parameters propsdict
matplotlib.figure_api#matplotlib.figure.Figure.update
update_from(other)[source] Copy properties from other to self.
matplotlib.figure_api#matplotlib.figure.Figure.update_from
waitforbuttonpress(timeout=- 1)[source] Blocking call to interact with the figure. Wait for user input and return True if a key was pressed, False if a mouse button was pressed and None if no input was given within timeout seconds. Negative values deactivate timeout.
matplotlib.figure_api#matplotlib.figure.Figure.waitforbuttonpress
zorder=0
matplotlib.figure_api#matplotlib.figure.Figure.zorder
classmatplotlib.figure.FigureBase(**kwargs)[source] Base class for figure.Figure and figure.SubFigure containing the methods that add artists to the figure or subfigure, create Axes, etc. add_artist(artist, clip=False)[source] Add an Artist to the figure. Usually artists are added to Axes objects using Axes.add_a...
matplotlib.figure_api#matplotlib.figure.FigureBase
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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.colorbar
contains(mouseevent)[source] Test whether the mouse event occurred on the figure. Returns bool, {}
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.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.FigureBase.convert_yunits
delaxes(ax)[source] Remove the Axes ax from the figure; update the current Axes.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.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.FigureBase.gca
get_agg_filter()[source] Return filter function to be used for agg filter.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_agg_filter
get_alpha()[source] Return the alpha value used for blending - not supported on all backends.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_alpha
get_animated()[source] Return whether the artist is animated.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_animated
get_children()[source] Get a list of artists contained in the figure.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_children
get_clip_box()[source] Return the clipbox.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_clip_box
get_clip_on()[source] Return whether the artist uses clipping.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_clip_on
get_clip_path()[source] Return the clip path.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_clip_path
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.FigureBase.get_cursor_data
get_default_bbox_extra_artists()[source]
matplotlib.figure_api#matplotlib.figure.FigureBase.get_default_bbox_extra_artists
get_edgecolor()[source] Get the edge color of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_edgecolor
get_facecolor()[source] Get the face color of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_facecolor
get_figure()[source] Return the Figure instance the artist belongs to.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_frameon
get_gid()[source] Return the group id.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_in_layout
get_label()[source] Return the label used for this artist in the legend.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_label
get_linewidth()[source] Get the line width of the Figure rectangle.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_linewidth
get_path_effects()[source]
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_picker
get_rasterized()[source] Return whether the artist is to be rasterized.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_sketch_params
get_snap()[source] Return the snap setting. See set_snap for details.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_tightbbox
get_transform()[source] Return the Transform instance used by this artist.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_transformed_clip_path_and_affine
get_url()[source] Return the url.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_url
get_visible()[source] Return the visibility.
matplotlib.figure_api#matplotlib.figure.FigureBase.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.FigureBase.get_window_extent
get_zorder()[source] Return the artist's zorder.
matplotlib.figure_api#matplotlib.figure.FigureBase.get_zorder
have_units()[source] Return whether units are set on any axis.
matplotlib.figure_api#matplotlib.figure.FigureBase.have_units