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 (v2.2.4). 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>
<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
<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
<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>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>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. x,y 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>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>*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>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>Draw a cursor in the event.axes if inaxes is not None. Use
<codeclass="descname">draw_event</code><spanclass="sig-paren">(</span><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>*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><aclass="reference internal" href="#matplotlib.backend_bases.FigureCanvasBase.draw" title="matplotlib.backend_bases.FigureCanvasBase.draw"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">draw()</span></code></a> only if idle; defaults to draw but backends can override</p>
<codeclass="descname">enter_notify_event</code><spanclass="sig-paren">(</span><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><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><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><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><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>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">idle_event</code><spanclass="sig-paren">(</span><em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.idle_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.idle_event" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.1: </span>The idle_event function was deprecated in version 2.1.</p>
<codeclass="descname">is_saving</code><spanclass="sig-paren">(</span><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>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>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>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">motion_notify_event</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.motion_notify_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.motion_notify_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function on any
motion-notify-event.</p>
<p>This method will call all functions connected to the
'motion_notify_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">mpl_connect</code><spanclass="sig-paren">(</span><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>Connect event with string <em>s</em> to <em>func</em>. The signature of <em>func</em> is:</p>
<p>where event is a <aclass="reference internal" href="#matplotlib.backend_bases.Event" title="matplotlib.backend_bases.Event"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">matplotlib.backend_bases.Event</span></code></a>. The
following events are recognized</p>
<ulclass="simple">
<li>'button_press_event'</li>
<li>'button_release_event'</li>
<li>'draw_event'</li>
<li>'key_press_event'</li>
<li>'key_release_event'</li>
<li>'motion_notify_event'</li>
<li>'pick_event'</li>
<li>'resize_event'</li>
<li>'scroll_event'</li>
<li>'figure_enter_event',</li>
<li>'figure_leave_event',</li>
<li>'axes_enter_event',</li>
<li>'axes_leave_event'</li>
<li>'close_event'</li>
</ul>
<p>For the location events (button and key press/release), if the
mouse is over the axes, the variable <codeclass="docutils literal notranslate"><spanclass="pre">event.inaxes</span></code> will be
set to the <aclass="reference internal" href="axes_api.html#matplotlib.axes.Axes" title="matplotlib.axes.Axes"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Axes</span></code></a> the event occurs is
over, and additionally, the variables <codeclass="docutils literal notranslate"><spanclass="pre">event.xdata</span></code> and
<codeclass="docutils literal notranslate"><spanclass="pre">event.ydata</span></code> will be defined. This is the mouse location
in data coords. See
<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> for more info.</p>
<p>Return value is a connection id that can be used with
<codeclass="descname">mpl_disconnect</code><spanclass="sig-paren">(</span><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>
<codeclass="descname">new_timer</code><spanclass="sig-paren">(</span><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>Creates a new backend-specific subclass of
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">backend_bases.Timer</span></code>. This is useful for getting periodic
events through the backend's native event loop. Implemented only for
<dd><pclass="first">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>
<pclass="last">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">onRemove</code><spanclass="sig-paren">(</span><em>ev</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.onRemove"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.onRemove" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.2: </span>The onRemove function was deprecated in version 2.2.</p>
</div>
<p>Mouse event processor which removes the top artist
under the cursor. Connect this to the 'mouse_press_event'
<codeclass="descname">pick</code><spanclass="sig-paren">(</span><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>
<codeclass="descname">pick_event</code><spanclass="sig-paren">(</span><em>mouseevent</em>, <em>artist</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureCanvasBase.pick_event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.pick_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be called by artists who are picked and will
fire off <aclass="reference internal" href="#matplotlib.backend_bases.PickEvent" title="matplotlib.backend_bases.PickEvent"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">PickEvent</span></code></a> callbacks registered listeners</p>
<codeclass="descname">release_mouse</code><spanclass="sig-paren">(</span><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">resize</code><spanclass="sig-paren">(</span><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><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>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>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">start_event_loop_default</code><spanclass="sig-paren">(</span><em>timeout=0</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.start_event_loop_default" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.1: </span>The start_event_loop_default function was deprecated in version 2.1.</p>
</div>
<p>Start a blocking event loop.</p>
<blockquote>
<div><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><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">stop_event_loop_default</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.stop_event_loop_default" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.1: </span>The stop_event_loop_default function was deprecated in version 2.1.</p>
</div>
<p>Stop the current blocking event loop.</p>
<blockquote>
<div>Interactive backends need to reimplement this to match
<codeclass="descname">supports_blit</code><emclass="property"> = True</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>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>
<codeclass="descname">destroy</code><spanclass="sig-paren">(</span><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><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><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>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 mpl key bindings defined at
<codeclass="descname">resize</code><spanclass="sig-paren">(</span><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>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><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
<codeclass="descname">show_popup</code><spanclass="sig-paren">(</span><em>msg</em><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#FigureManagerBase.show_popup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.show_popup" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.2: </span>The show_popup function was deprecated in version 2.2.</p>
<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>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><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><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 true if the object should try to do antialiased rendering</p>
<codeclass="descname">get_capstyle</code><spanclass="sig-paren">(</span><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><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><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-class docutils literal notranslate"><spanclass="pre">Bbox</span></code></a>
<codeclass="descname">get_dashes</code><spanclass="sig-paren">(</span><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 information as an offset dashlist tuple.</p>
<p>The dash list is a even size list that gives the ink on, ink
off in pixels.</p>
<p>See p107 of to PostScript <aclass="reference external" href="https://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF">BLUEBOOK</a>
<codeclass="descname">get_forced_alpha</code><spanclass="sig-paren">(</span><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><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><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><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><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>
<dd><p>Gets the linewidth to use for hatching.</p>
<codeclass="descname">get_hatch_path</code><spanclass="sig-paren">(</span><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>
<codeclass="descname">get_joinstyle</code><spanclass="sig-paren">(</span><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_linestyle</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal" href="../_modules/matplotlib/backend_bases.html#GraphicsContextBase.get_linestyle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_linestyle" title="Permalink to this definition">¶</a></dt>
<dd><divclass="deprecated">
<p><spanclass="versionmodified">Deprecated since version 2.1: </span>The get_linestyle function was deprecated in version 2.1.</p>
</div>
<p>Return the linestyle: one of ('solid', 'dashed', 'dashdot',
<codeclass="descname">get_linewidth</code><spanclass="sig-paren">(</span><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>
<dd><p>Return the line width in points as a scalar</p>
<codeclass="descname">get_rgb</code><spanclass="sig-paren">(</span><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>returns a tuple of three or four floats from 0-1.</p>
<codeclass="descname">get_sketch_params</code><spanclass="sig-paren">(</span><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>Returns the sketch parameters for the artist.</p>