You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.0). For the latest version see <ahref="https://matplotlib.org/stable/api/backend_bases_api.html">https://matplotlib.org/stable/api/backend_bases_api.html</a></div>
<spanid="matplotlib-backend-bases"></span><h1><aclass="reference internal" href="#module-matplotlib.backend_bases" title="matplotlib.backend_bases"><codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">matplotlib.backend_bases</span></code></a><aclass="headerlink" href="#module-matplotlib.backend_bases" title="Permalink to this headline">¶</a></h1>
<p>Abstract base classes define the primitives that renderers and
graphics contexts must implement to serve as a matplotlib backend</p>
<dlclass="docutils">
<dt><aclass="reference internal" href="#matplotlib.backend_bases.RendererBase" title="matplotlib.backend_bases.RendererBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">RendererBase</span></code></a></dt><dd>An abstract base class to handle drawing/rendering operations.</dd>
<dt><aclass="reference internal" href="#matplotlib.backend_bases.FigureCanvasBase" title="matplotlib.backend_bases.FigureCanvasBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">FigureCanvasBase</span></code></a></dt><dd>The abstraction layer that separates the
<aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">matplotlib.figure.Figure</span></code></a> from the backend specific
details like a user interface drawing area</dd>
<dt><aclass="reference internal" href="#matplotlib.backend_bases.GraphicsContextBase" title="matplotlib.backend_bases.GraphicsContextBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">GraphicsContextBase</span></code></a></dt><dd>An abstract base class that provides color, line styles, etc...</dd>
<dt><aclass="reference internal" href="#matplotlib.backend_bases.Event" title="matplotlib.backend_bases.Event"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Event</span></code></a></dt><dd>The base class for all of the matplotlib event
handling. Derived classes such as <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">KeyEvent</span></code></a> and
<aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MouseEvent</span></code></a> store the meta data like keys and buttons
<dt><aclass="reference internal" href="#matplotlib.backend_bases.ShowBase" title="matplotlib.backend_bases.ShowBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ShowBase</span></code></a></dt><dd>The base class for the Show class of each interactive backend;
the 'show' callable is then set to Show.__call__, inherited from
ShowBase.</dd>
<dt><aclass="reference internal" href="#matplotlib.backend_bases.ToolContainerBase" title="matplotlib.backend_bases.ToolContainerBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ToolContainerBase</span></code></a></dt><dd>The base class for the Toolbar class of each interactive backend.</dd>
<dt><aclass="reference internal" href="#matplotlib.backend_bases.StatusbarBase" title="matplotlib.backend_bases.StatusbarBase"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">StatusbarBase</span></code></a></dt><dd>The base class for the messaging area.</dd>
</dl>
<dlclass="class">
<dtid="matplotlib.backend_bases.CloseEvent">
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">CloseEvent</code><spanclass="sig-paren">(</span><em>name</em>, <em>canvas</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#CloseEvent"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.CloseEvent" title="Permalink to this definition">¶</a></dt>
<p>An event triggered by a draw operation on the canvas</p>
<p>In most backends callbacks subscribed to this callback will be
fired after the rendering is complete but before the screen is
updated. Any extra artists drawn to the canvas's renderer will
be reflected without an explicit call to <codeclass="docutils literal notranslate"><spanclass="pre">blit</span></code>.</p>
<divclass="admonition warning">
<pclass="first admonition-title">Warning</p>
<pclass="last">Calling <codeclass="docutils literal notranslate"><spanclass="pre">canvas.draw</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">canvas.blit</span></code> in these callbacks may
not be safe with all backends and may cause infinite recursion.</p>
</div>
<p>In addition to the <aclass="reference internal" href="#matplotlib.backend_bases.Event" title="matplotlib.backend_bases.Event"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Event</span></code></a> attributes, the following event
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">FigureCanvasBase</code><spanclass="sig-paren">(</span><em>figure</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">blit</code><spanclass="sig-paren">(</span><em>self</em>, <em>bbox=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.blit"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.blit" title="Permalink to this definition">¶</a></dt>
<dd><p>Blit the canvas in bbox (default entire canvas).</p>
<codeclass="descname">button_press_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>x</em>, <em>y</em>, <em>button</em>, <em>dblclick=False</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.button_press_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.button_press_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function on any mouse
button press. (<em>x</em>, <em>y</em>) are the canvas coords ((0, 0) is lower left).
button and key are as defined in <aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MouseEvent</span></code></a>.</p>
<p>This method will be call all functions connected to the
'button_press_event' with a <aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MouseEvent</span></code></a> instance.</p>
<codeclass="descname">close_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.close_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.close_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass a <aclass="reference internal" href="#matplotlib.backend_bases.CloseEvent" title="matplotlib.backend_bases.CloseEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">CloseEvent</span></code></a> to all functions connected to <codeclass="docutils literal notranslate"><spanclass="pre">close_event</span></code>.</p>
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><em>self</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.draw"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">draw_cursor</code><spanclass="sig-paren">(</span><em>self</em>, <em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.draw_cursor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw_cursor" title="Permalink to this definition">¶</a></dt>
<dd><p>[<em>Deprecated</em>] Draw a cursor in the event.axes if inaxes is not None. Use
native GUI drawing for efficiency if possible</p>
<pclass="rubric">Notes</p>
<divclass="deprecated">
<p><spanclass="versionmodified deprecated">Deprecated since version 3.2.</span></p>
<codeclass="descname">draw_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>renderer</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.draw_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass a <aclass="reference internal" href="#matplotlib.backend_bases.DrawEvent" title="matplotlib.backend_bases.DrawEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">DrawEvent</span></code></a> to all functions connected to <codeclass="docutils literal notranslate"><spanclass="pre">draw_event</span></code>.</p>
<codeclass="descname">draw_idle</code><spanclass="sig-paren">(</span><em>self</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.draw_idle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw_idle" title="Permalink to this definition">¶</a></dt>
<dd><p>Request a widget redraw once control returns to the GUI event loop.</p>
<p>Even if multiple calls to <aclass="reference internal" href="#matplotlib.backend_bases.FigureCanvasBase.draw_idle" title="matplotlib.backend_bases.FigureCanvasBase.draw_idle"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">draw_idle</span></code></a> occur before control returns
to the GUI event loop, the figure will only be rendered once.</p>
<pclass="rubric">Notes</p>
<p>Backends may choose to override the method and implement their own
<codeclass="descname">enter_notify_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>guiEvent=None</em>, <em>xy=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.enter_notify_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.enter_notify_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function when entering
<codeclass="descname">fixed_dpi</code><emclass="property"> = None</em><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.fixed_dpi" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">flush_events</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.flush_events"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.flush_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Flush the GUI events for the figure.</p>
<p>Interactive backends need to reimplement this method.</p>
<codeclass="descname">get_default_filename</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_default_filename"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_default_filename" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string, which includes extension, suitable for use as
<emclass="property">classmethod </em><codeclass="descname">get_default_filetype</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_default_filetype"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_default_filetype" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the default savefig file format as specified in rcParam
<codeclass="docutils literal notranslate"><spanclass="pre">savefig.format</span></code>. Returned string excludes period. Overridden
in backends that only support a single file type.</p>
<emclass="property">classmethod </em><codeclass="descname">get_supported_filetypes</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_supported_filetypes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_supported_filetypes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return dict of savefig file formats supported by this backend.</p>
<emclass="property">classmethod </em><codeclass="descname">get_supported_filetypes_grouped</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_supported_filetypes_grouped"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_supported_filetypes_grouped" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dict of savefig file formats supported by this backend,
where the keys are a file type name, such as 'Joint Photographic
Experts Group', and the values are a list of filename extensions used
<codeclass="descname">get_width_height</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_width_height"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_width_height" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the figure width and height in points or pixels
(depending on the backend), truncated to integers</p>
<codeclass="descname">get_window_title</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.get_window_title"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.get_window_title" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the title text of the window containing the figure.
Return None if there is no window (e.g., a PS backend).</p>
<codeclass="descname">grab_mouse</code><spanclass="sig-paren">(</span><em>self</em>, <em>ax</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.grab_mouse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.grab_mouse" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the child axes which are currently grabbing the mouse events.
Usually called by the widgets themselves.
It is an error to call this if the mouse is already grabbed by
<codeclass="descname">inaxes</code><spanclass="sig-paren">(</span><em>self</em>, <em>xy</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.inaxes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.inaxes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the topmost visible <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code></a> containing the point <em>xy</em>.</p>
<dt><strong>xy</strong><spanclass="classifier">tuple or list</span></dt><dd><p>(x, y) coordinates.
x position - pixels from left of canvas.
y position - pixels from bottom of canvas.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>axes</strong><spanclass="classifier"><aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code></a> or None</span></dt><dd><p>The topmost visible axes containing the point, or None if no axes.</p>
<codeclass="descname">is_saving</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.is_saving"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.is_saving" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns whether the renderer is in the process of saving
to a file, rather than rendering for an on-screen buffer.</p>
<codeclass="descname">key_press_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>key</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.key_press_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.key_press_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass a <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">KeyEvent</span></code></a> to all functions connected to <codeclass="docutils literal notranslate"><spanclass="pre">key_press_event</span></code>.</p>
<codeclass="descname">key_release_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>key</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.key_release_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.key_release_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass a <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">KeyEvent</span></code></a> to all functions connected to <codeclass="docutils literal notranslate"><spanclass="pre">key_release_event</span></code>.</p>
<codeclass="descname">leave_notify_event</code><spanclass="sig-paren">(</span><em>self</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.leave_notify_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.leave_notify_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function when leaving
<codeclass="descname">mpl_connect</code><spanclass="sig-paren">(</span><em>self</em>, <em>s</em>, <em>func</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.mpl_connect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.mpl_connect" title="Permalink to this definition">¶</a></dt>
<dd><p>Bind function <em>func</em> to event <em>s</em>.</p>
<p>For the location events (button and key press/release), if the
mouse is over the axes, the <codeclass="docutils literal notranslate"><spanclass="pre">inaxes</span></code> attribute of the event will
be set to the <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Axes</span></code></a> the event occurs is over, and
additionally, the variables <codeclass="docutils literal notranslate"><spanclass="pre">xdata</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ydata</span></code> attributes will
be set to the mouse location in data coordinates. See <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">KeyEvent</span></code></a>
and <aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MouseEvent</span></code></a> for more info.</p>
</dd>
</dl>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt>cid</dt><dd><p>A connection id that can be used with
<codeclass="descname">mpl_disconnect</code><spanclass="sig-paren">(</span><em>self</em>, <em>cid</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.mpl_disconnect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.mpl_disconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>Disconnect the callback with id <em>cid</em>.</p>
<codeclass="descname">new_timer</code><spanclass="sig-paren">(</span><em>self</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.new_timer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.new_timer" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new backend-specific subclass of <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Timer</span></code>.</p>
<p>This is useful for getting periodic events through the backend's native
event loop. Implemented only for backends with GUIs.</p>
<trclass="field-odd field"><thclass="field-name">Other Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>interval</strong><spanclass="classifier">scalar</span></dt><dd><p>Timer interval in milliseconds</p>
</dd>
<dt><strong>callbacks</strong><spanclass="classifier">List[Tuple[callable, Tuple, Dict]]</span></dt><dd><p>Sequence of (func, args, kwargs) where <codeclass="docutils literal notranslate"><spanclass="pre">func(*args,</span><spanclass="pre">**kwargs)</span></code>
will be executed by the timer every <em>interval</em>.</p>
<p>Callbacks which return <codeclass="docutils literal notranslate"><spanclass="pre">False</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">0</span></code> will be removed from the
<codeclass="descname">pick</code><spanclass="sig-paren">(</span><em>self</em>, <em>mouseevent</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.pick"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.pick" title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>filename</strong></dt><dd><p>can also be a file object on image backends</p>
</dd>
<dt><strong>orientation</strong><spanclass="classifier">{'landscape', 'portrait'}, default: 'portrait'</span></dt><dd><p>only currently applies to PostScript printing.</p>
</dd>
<dt><strong>dpi</strong><spanclass="classifier">scalar, optional</span></dt><dd><p>the dots per inch to save the figure in; if None, use savefig.dpi</p>
</dd>
<dt><strong>facecolor</strong><spanclass="classifier">color, default: <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=savefig.facecolor#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["savefig.facecolor"]</span></a></code> (default: 'white')</span></dt><dd><p>The facecolor of the figure.</p>
</dd>
<dt><strong>edgecolor</strong><spanclass="classifier">color, default: <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=savefig.edgecolor#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["savefig.edgecolor"]</span></a></code> (default: 'white')</span></dt><dd><p>The edgecolor of the figure.</p>
</dd>
<dt><strong>format</strong><spanclass="classifier">str, optional</span></dt><dd><p>Force a specific file format. If not given, the format is inferred
from the <em>filename</em> extension, and if that fails from
<dt><strong>bbox_inches</strong><spanclass="classifier">'tight' or <aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a>, default: <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=savefig.bbox#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["savefig.bbox"]</span></a></code> (default: None)</span></dt><dd><p>Bbox in inches. Only the given portion of the figure is
saved. If 'tight', try to figure out the tight bbox of
the figure.</p>
</dd>
<dt><strong>pad_inches</strong><spanclass="classifier">float, default: <codeclass="docutils literal notranslate"><aclass="reference external" href="../tutorials/introductory/customizing.html?highlight=savefig.pad_inches#a-sample-matplotlibrc-file"><spanclass="pre">rcParams["savefig.pad_inches"]</span></a></code> (default: 0.1)</span></dt><dd><p>Amount of padding around the figure when <em>bbox_inches</em> is 'tight'.</p>
</dd>
<dt><strong>bbox_extra_artists</strong><spanclass="classifier">list of <aclass="reference internal" href="artist_api.html#matplotlib.artist.Artist" title="matplotlib.artist.Artist"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Artist</span></code></a>, optional</span></dt><dd><p>A list of extra artists that will be considered when the
<codeclass="descname">release_mouse</code><spanclass="sig-paren">(</span><em>self</em>, <em>ax</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.release_mouse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.release_mouse" title="Permalink to this definition">¶</a></dt>
<dd><p>Release the mouse grab held by the axes, ax.
Usually called by the widgets.
It is ok to call this even if you ax doesn't have the mouse
<codeclass="descname">required_interactive_framework</code><emclass="property"> = None</em><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.required_interactive_framework" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">resize</code><spanclass="sig-paren">(</span><em>self</em>, <em>w</em>, <em>h</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.resize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.resize" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">resize_event</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.resize_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.resize_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass a <aclass="reference internal" href="#matplotlib.backend_bases.ResizeEvent" title="matplotlib.backend_bases.ResizeEvent"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ResizeEvent</span></code></a> to all functions connected to <codeclass="docutils literal notranslate"><spanclass="pre">resize_event</span></code>.</p>
<codeclass="descname">set_window_title</code><spanclass="sig-paren">(</span><em>self</em>, <em>title</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.set_window_title"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.set_window_title" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the title text of the window containing the figure. Note that
this has no effect if there is no window (e.g., a PS backend).</p>
<codeclass="descname">start_event_loop</code><spanclass="sig-paren">(</span><em>self</em>, <em>timeout=0</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.start_event_loop"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.start_event_loop" title="Permalink to this definition">¶</a></dt>
<dd><p>Start a blocking event loop.</p>
<p>Such an event loop is used by interactive functions, such as <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">ginput</span></code>
and <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">waitforbuttonpress</span></code>, to wait for events.</p>
<p>The event loop blocks until a callback function triggers
<aclass="reference internal" href="#matplotlib.backend_bases.FigureCanvasBase.stop_event_loop" title="matplotlib.backend_bases.FigureCanvasBase.stop_event_loop"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">stop_event_loop</span></code></a>, or <em>timeout</em> is reached.</p>
<p>If <em>timeout</em> is negative, never timeout.</p>
<p>Only interactive backends need to reimplement this method and it relies
on <aclass="reference internal" href="#matplotlib.backend_bases.FigureCanvasBase.flush_events" title="matplotlib.backend_bases.FigureCanvasBase.flush_events"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">flush_events</span></code></a> being properly implemented.</p>
<p>Interactive backends should implement this in a more native way.</p>
<codeclass="descname">stop_event_loop</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.stop_event_loop"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.stop_event_loop" title="Permalink to this definition">¶</a></dt>
<dd><p>Stop the current blocking event loop.</p>
<p>Interactive backends need to reimplement this to match
<codeclass="descname">supports_blit</code><emclass="property"> = False</em><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.supports_blit" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">switch_backends</code><spanclass="sig-paren">(</span><em>self</em>, <em>FigureCanvasClass</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.switch_backends"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.switch_backends" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate an instance of FigureCanvasClass</p>
<p>This is used for backend switching, e.g., to instantiate a
FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is
not done, so any changes to one of the instances (e.g., setting
figure size or line props), will be reflected in the other</p>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">FigureManagerBase</code><spanclass="sig-paren">(</span><em>canvas</em>, <em>num</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase" title="Permalink to this definition">¶</a></dt>
<p><strong>Key and mouse button press handling</strong></p>
<p>The figure manager sets up default key and mouse button press handling by
hooking up the <aclass="reference internal" href="#matplotlib.backend_bases.key_press_handler" title="matplotlib.backend_bases.key_press_handler"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">key_press_handler</span></code></a> to the matplotlib event system. This
ensures the same shortcuts and mouse actions across backends.</p>
<p><strong>Other operations</strong></p>
<p>Subclasses will have additional attributes and functions to access
additional functionality. This is of course backend-specific. For example,
most GUI backends have <codeclass="docutils literal notranslate"><spanclass="pre">window</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">toolbar</span></code> attributes that give
access to the native GUI widgets of the respective framework.</p>
<dt><strong>button_press_handler_id</strong><spanclass="classifier">int</span></dt><dd><p>The default mouse button handler cid, when using the toolmanager.
To disable the default button press handling use:</p>
<codeclass="descname">button_press</code><spanclass="sig-paren">(</span><em>self</em>, <em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.button_press"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.button_press" title="Permalink to this definition">¶</a></dt>
<dd><p>The default Matplotlib button actions for extra mouse buttons.</p>
<codeclass="descname">destroy</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.destroy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.destroy" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">full_screen_toggle</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.full_screen_toggle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.full_screen_toggle" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_window_title</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.get_window_title"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.get_window_title" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the title text of the window containing the figure.</p>
<p>Return None for non-GUI (e.g., PS) backends.</p>
<codeclass="descname">key_press</code><spanclass="sig-paren">(</span><em>self</em>, <em>event</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.key_press"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.key_press" title="Permalink to this definition">¶</a></dt>
<dd><p>Implement the default Matplotlib key bindings defined at
<codeclass="descname">resize</code><spanclass="sig-paren">(</span><em>self</em>, <em>w</em>, <em>h</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.resize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.resize" title="Permalink to this definition">¶</a></dt>
<dd><p>For GUI backends, resize the window (in pixels).</p>
<codeclass="descname">set_window_title</code><spanclass="sig-paren">(</span><em>self</em>, <em>title</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.set_window_title"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.set_window_title" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the title text of the window containing the figure.</p>
<p>This has no effect for non-GUI (e.g., PS) backends.</p>
<codeclass="descname">show</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.show"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.show" title="Permalink to this definition">¶</a></dt>
<dd><p>For GUI backends, show the figure window and redraw.
For non-GUI backends, raise an exception to be caught
by <aclass="reference internal" href="_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure.show" title="matplotlib.figure.Figure.show"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">show()</span></code></a>, for an
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">GraphicsContextBase</code><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">copy_properties</code><spanclass="sig-paren">(</span><em>self</em>, <em>gc</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.copy_properties"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.copy_properties" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_alpha</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_alpha"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_alpha" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the alpha value used for blending - not supported on
<codeclass="descname">get_antialiased</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_antialiased"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_antialiased" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the object should try to do antialiased rendering.</p>
<codeclass="descname">get_capstyle</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_capstyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_capstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the capstyle as a string in ('butt', 'round', 'projecting').</p>
<codeclass="descname">get_clip_path</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_clip_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_clip_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the clip path in the form (path, transform), where path
is a <aclass="reference internal" href="path_api.html#matplotlib.path.Path" title="matplotlib.path.Path"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Path</span></code></a> instance, and transform is
an affine transform to apply to the path before clipping.</p>
<codeclass="descname">get_clip_rectangle</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_clip_rectangle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_clip_rectangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the clip rectangle as a <aclass="reference internal" href="transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Bbox</span></code></a> instance.</p>
<codeclass="descname">get_dashes</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_dashes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_dashes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the dash style as an (offset, dash-list) pair.</p>
<p>The dash list is a even-length list that gives the ink on, ink off in
points. See p. 107 of to PostScript <aclass="reference external" href="https://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF">blue book</a> for more info.</p>
<codeclass="descname">get_forced_alpha</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_forced_alpha"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_forced_alpha" title="Permalink to this definition">¶</a></dt>
<dd><p>Return whether the value given by get_alpha() should be used to
<codeclass="descname">get_gid</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_gid"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_gid" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the object identifier if one is set, None otherwise.</p>
<codeclass="descname">get_hatch</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_hatch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_hatch" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_hatch_color</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_hatch_color"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_hatch_color" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_hatch_linewidth</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_hatch_linewidth"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_hatch_linewidth" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_hatch_path</code><spanclass="sig-paren">(</span><em>self</em>, <em>density=6.0</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_hatch_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_hatch_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Path</span></code> for the current hatch.</p>
<codeclass="descname">get_joinstyle</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_joinstyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_joinstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the line join style as one of ('miter', 'round', 'bevel').</p>
<codeclass="descname">get_linewidth</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_linewidth"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_linewidth" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_rgb</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_rgb"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_rgb" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a tuple of three or four floats from 0-1.</p>
<codeclass="descname">get_sketch_params</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_sketch_params"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_sketch_params" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the sketch parameters for the artist.</p>
<trclass="field-odd field"><thclass="field-name">Returns:</th><tdclass="field-body"><dlclass="first last docutils">
<dt><strong>sketch_params</strong><spanclass="classifier">tuple or <aclass="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">None</span></code></a></span></dt><dd><p>A 3-tuple with the following elements:</p>
<ulclass="simple">
<li><codeclass="docutils literal notranslate"><spanclass="pre">scale</span></code>: The amplitude of the wiggle perpendicular to the
source line.</li>
<li><codeclass="docutils literal notranslate"><spanclass="pre">length</span></code>: The length of the wiggle along the line.</li>
<li><codeclass="docutils literal notranslate"><spanclass="pre">randomness</span></code>: The scale factor by which the length is
shrunken or expanded.</li>
</ul>
<p>May return <aclass="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.8)"><codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">None</span></code></a> if no sketch parameters were set.</p>
<codeclass="descname">get_snap</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_snap"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_snap" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the snap setting, which can be:</p>
<ulclass="simple">
<li>True: snap vertices to the nearest pixel center</li>
<li>False: leave vertices as-is</li>
<li>None: (auto) If the path contains only rectilinear line segments,
<codeclass="descname">get_url</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_url"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a url if one is set, None otherwise.</p>
<codeclass="descname">restore</code><spanclass="sig-paren">(</span><em>self</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.restore"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.restore" title="Permalink to this definition">¶</a></dt>
<dd><p>Restore the graphics context from the stack - needed only
for backends that save graphics contexts on a stack.</p>
<codeclass="descname">set_alpha</code><spanclass="sig-paren">(</span><em>self</em>, <em>alpha</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.set_alpha"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_alpha" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the alpha value used for blending - not supported on all backends.</p>
<p>If <codeclass="docutils literal notranslate"><spanclass="pre">alpha=None</span></code> (the default), the alpha components of the
foreground and fill colors will be used to set their respective
transparencies (where applicable); otherwise, <codeclass="docutils literal notranslate"><spanclass="pre">alpha</span></code> will override