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 (v1.5.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>
<aclass="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><codeclass="xref py py-class docutils literal"><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"><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"><spanclass="pre">MouseEvent</span></code></a> store the meta data like keys and buttons
<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="headerlink" href="#matplotlib.backend_bases.CloseEvent" title="Permalink to this definition">¶</a></dt>
<p>An event triggered by a figure being closed</p>
<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"><spanclass="pre">Event</span></code></a> attributes, the following event
attributes are defined:</p>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.backend_bases.DrawEvent">
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">DrawEvent</code><spanclass="sig-paren">(</span><em>name</em>, <em>canvas</em>, <em>renderer</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.DrawEvent" title="Permalink to this definition">¶</a></dt>
<p>An event triggered by a draw operation on the canvas</p>
<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"><spanclass="pre">Event</span></code></a> attributes, the following event
attributes are defined:</p>
<dlclass="docutils">
<dt><em>renderer</em></dt>
<dd>the <aclass="reference internal" href="#matplotlib.backend_bases.RendererBase" title="matplotlib.backend_bases.RendererBase"><codeclass="xref py py-class docutils literal"><spanclass="pre">RendererBase</span></code></a> instance for the draw event</dd>
</dl>
</dd></dl>
<dlclass="class">
<dtid="matplotlib.backend_bases.Event">
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">Event</code><spanclass="sig-paren">(</span><em>name</em>, <em>canvas</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.Event" title="Permalink to this definition">¶</a></dt>
<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="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="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="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"><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"><spanclass="pre">MouseEvent</span></code></a> instance.</p>
<codeclass="descname">button_release_event</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em>, <em>button</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.button_release_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function on any mouse
button release.</p>
<dlclass="docutils">
<dt><em>x</em></dt>
<dd>the canvas coordinates where 0=left</dd>
<dt><em>y</em></dt>
<dd>the canvas coordinates where 0=bottom</dd>
<dt><em>guiEvent</em></dt>
<dd>the native UI event that generated the mpl event</dd>
</dl>
<p>This method will be call all functions connected to the
‘button_release_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-class docutils literal"><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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.close_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be called by all functions connected to the
‘close_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.CloseEvent" title="matplotlib.backend_bases.CloseEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">CloseEvent</span></code></a></p>
<codeclass="descname">draw</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw" title="Permalink to this definition">¶</a></dt>
<dd><p>Render the <aclass="reference internal" href="figure_api.html#matplotlib.figure.Figure" title="matplotlib.figure.Figure"><codeclass="xref py py-class docutils literal"><spanclass="pre">Figure</span></code></a></p>
<codeclass="descname">draw_cursor</code><spanclass="sig-paren">(</span><em>event</em><spanclass="sig-paren">)</span><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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.draw_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be call all functions connected to the
‘draw_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.DrawEvent" title="matplotlib.backend_bases.DrawEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">DrawEvent</span></code></a></p>
<codeclass="descname">draw_idle</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><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"><spanclass="pre">draw()</span></code></a> only if idle; defaults to draw but backends can overrride</p>
<codeclass="descname">enter_notify_event</code><spanclass="sig-paren">(</span><em>guiEvent=None</em>, <em>xy=None</em><spanclass="sig-paren">)</span><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
canvas</p>
<dlclass="docutils">
<dt><em>guiEvent</em></dt>
<dd>the native UI event that generated the mpl event</dd>
<dt><em>xy</em></dt>
<dd>the coordinate location of the pointer when the canvas is
<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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.flush_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Flush the GUI events for the figure. Implemented only for
<codeclass="descname">get_default_filename</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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="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"><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="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="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
for that filetype, such as [‘jpg’, ‘jpeg’].</p>
<codeclass="descname">get_width_height</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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="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="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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.idle_event" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">is_saving</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.is_saving" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <codeclass="xref py py-obj docutils literal"><spanclass="pre">True</span></code> when 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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.key_press_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be call all functions connected to the
‘key_press_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">KeyEvent</span></code></a></p>
<codeclass="descname">key_release_event</code><spanclass="sig-paren">(</span><em>key</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.key_release_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be call all functions connected to the
‘key_release_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.KeyEvent" title="matplotlib.backend_bases.KeyEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">KeyEvent</span></code></a></p>
<codeclass="descname">leave_notify_event</code><spanclass="sig-paren">(</span><em>guiEvent=None</em><spanclass="sig-paren">)</span><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
canvas</p>
<dlclass="docutils">
<dt><em>guiEvent</em></dt>
<dd>the native UI event that generated the mpl event</dd>
<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="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>
<dlclass="docutils">
<dt><em>x</em></dt>
<dd>the canvas coordinates where 0=left</dd>
<dt><em>y</em></dt>
<dd>the canvas coordinates where 0=bottom</dd>
<dt><em>guiEvent</em></dt>
<dd>the native UI event that generated the mpl event</dd>
</dl>
<p>This method will be 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"><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="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"><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"><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"><spanclass="pre">Axes</span></code></a> the event occurs is
over, and additionally, the variables <codeclass="docutils literal"><spanclass="pre">event.xdata</span></code> and
<codeclass="docutils literal"><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"><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"><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="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="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"><spanclass="pre">backend_bases.Timer</span></code>. This is useful for getting periodic
events through the backend’s native event loop. Implemented only for
backends with GUIs.</p>
<p>optional arguments:</p>
<dlclass="docutils">
<dt><em>interval</em></dt>
<dd>Timer interval in milliseconds</dd>
<dt><em>callbacks</em></dt>
<dd>Sequence of (func, args, kwargs) where func(<em>args, **kwargs) will
be executed by the timer every *interval</em>.</dd>
<codeclass="descname">onHilite</code><spanclass="sig-paren">(</span><em>ev</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.onHilite" title="Permalink to this definition">¶</a></dt>
<dd><p>Mouse event processor which highlights the artists
under the cursor. Connect this to the ‘motion_notify_event’
<codeclass="descname">onRemove</code><spanclass="sig-paren">(</span><em>ev</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.onRemove" title="Permalink to this definition">¶</a></dt>
<dd><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="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="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"><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="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="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="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.resize_event" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be call all functions connected to the
‘resize_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.ResizeEvent" title="matplotlib.backend_bases.ResizeEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">ResizeEvent</span></code></a></p>
<codeclass="descname">scroll_event</code><spanclass="sig-paren">(</span><em>x</em>, <em>y</em>, <em>step</em>, <em>guiEvent=None</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.scroll_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Backend derived classes should call this function on any
scroll wheel event. x,y are the canvas coords: 0,0 is lower,
left. button and key are as defined in MouseEvent.</p>
<p>This method will be call all functions connected to the
‘scroll_event’ with a <aclass="reference internal" href="#matplotlib.backend_bases.MouseEvent" title="matplotlib.backend_bases.MouseEvent"><codeclass="xref py py-class docutils literal"><spanclass="pre">MouseEvent</span></code></a> instance.</p>
<codeclass="descname">set_window_title</code><spanclass="sig-paren">(</span><em>title</em><spanclass="sig-paren">)</span><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</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.start_event_loop" title="Permalink to this definition">¶</a></dt>
<dd><p>Start an event loop. This is used to start a blocking event
loop so that interactive functions, such as ginput and
waitforbuttonpress, can wait for events. This should not be
confused with the main GUI event loop, which is always running
and has nothing to do with this.</p>
<p>This is implemented only for backends with GUIs.</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><p>Start an event loop. This is used to start a blocking event
loop so that interactive functions, such as ginput and
waitforbuttonpress, can wait for events. This should not be
confused with the main GUI event loop, which is always running
and has nothing to do with this.</p>
<p>This function provides default event loop functionality based
on time.sleep that is meant to be used until event loop
functions for each of the GUI backends can be written. As
<codeclass="descname">stop_event_loop</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.FigureCanvasBase.stop_event_loop" title="Permalink to this definition">¶</a></dt>
<dd><p>Stop an event loop. This is used to stop a blocking event
loop so that interactive functions, such as ginput and
waitforbuttonpress, can wait for events.</p>
<p>This is implemented only for backends with GUIs.</p>
<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><p>Stop an event loop. This is used to stop a blocking event
loop so that interactive functions, such as ginput and
<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="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="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="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="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="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.
Return None for non-GUI backends (e.g., a PS backend).</p>
<codeclass="descname">key_press</code><spanclass="sig-paren">(</span><em>event</em><spanclass="sig-paren">)</span><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="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="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. Note that
this has no effect for non-GUI backends (e.g., a PS backend).</p>
<codeclass="descname">show</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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="figure_api.html#matplotlib.figure.Figure.show" title="matplotlib.figure.Figure.show"><codeclass="xref py py-meth docutils literal"><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="headerlink" href="#matplotlib.backend_bases.FigureManagerBase.show_popup" title="Permalink to this definition">¶</a></dt>
<dd><p>Display message in a popup – GUI only</p>
<emclass="property">class </em><codeclass="descclassname">matplotlib.backend_bases.</code><codeclass="descname">GraphicsContextBase</code><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="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="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="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="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="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"><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="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="../devel/transformations.html#matplotlib.transforms.Bbox" title="matplotlib.transforms.Bbox"><codeclass="xref py py-class docutils literal"><spanclass="pre">Bbox</span></code></a>
<codeclass="descname">get_dashes</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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="http://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="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="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="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_hatch" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_hatch_path</code><spanclass="sig-paren">(</span><em>density=6.0</em><spanclass="sig-paren">)</span><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="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><em>style</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_linestyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the linestyle: one of (‘solid’, ‘dashed’, ‘dashdot’,
<codeclass="descname">get_linewidth</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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="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="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>
<codeclass="descname">get_snap</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_snap" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the snap setting which may be:</p>
<blockquote>
<div><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
<codeclass="descname">get_url</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.get_url" title="Permalink to this definition">¶</a></dt>
<dd><p>returns a url if one is set, None otherwise</p>
<codeclass="descname">restore</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>alpha</em><spanclass="sig-paren">)</span><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.
If <codeclass="docutils literal"><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"><spanclass="pre">alpha</span></code> will override
<codeclass="descname">set_antialiased</code><spanclass="sig-paren">(</span><em>b</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_antialiased" title="Permalink to this definition">¶</a></dt>
<dd><p>True if object should be drawn with antialiased rendering</p>
<codeclass="descname">set_capstyle</code><spanclass="sig-paren">(</span><em>cs</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_capstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the capstyle as a string in (‘butt’, ‘round’, ‘projecting’)</p>
<codeclass="descname">set_clip_path</code><spanclass="sig-paren">(</span><em>path</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_clip_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the clip path and transformation. Path should be a
<codeclass="descname">set_clip_rectangle</code><spanclass="sig-paren">(</span><em>rectangle</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_clip_rectangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the clip rectangle with sequence (left, bottom, width, height)</p>
<codeclass="descname">set_dashes</code><spanclass="sig-paren">(</span><em>dash_offset</em>, <em>dash_list</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_dashes" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the dash style for the gc.</p>
<dlclass="docutils">
<dt><em>dash_offset</em></dt>
<dd>is the offset (usually 0).</dd>
<dt><em>dash_list</em></dt>
<dd>specifies the on-off sequence as points.
<codeclass="docutils literal"><spanclass="pre">(None,</span><spanclass="pre">None)</span></code> specifies a solid line</dd>
<codeclass="descname">set_foreground</code><spanclass="sig-paren">(</span><em>fg</em>, <em>isRGBA=False</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_foreground" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the foreground color. fg can be a MATLAB format string, a
html hex color string, an rgb or rgba unit tuple, or a float between 0
and 1. In the latter case, grayscale is used.</p>
<p>If you know fg is rgba, set <codeclass="docutils literal"><spanclass="pre">isRGBA=True</span></code> for efficiency.</p>
<codeclass="descname">set_gid</code><spanclass="sig-paren">(</span><em>id</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_gid" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_graylevel</code><spanclass="sig-paren">(</span><em>frac</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_graylevel" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the foreground color to be a gray level with <em>frac</em></p>
<codeclass="descname">set_hatch</code><spanclass="sig-paren">(</span><em>hatch</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_hatch" title="Permalink to this definition">¶</a></dt>
<codeclass="descname">set_joinstyle</code><spanclass="sig-paren">(</span><em>js</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_joinstyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the join style to be one of (‘miter’, ‘round’, ‘bevel’)</p>
<codeclass="descname">set_linestyle</code><spanclass="sig-paren">(</span><em>style</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_linestyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the linestyle to be one of (‘solid’, ‘dashed’, ‘dashdot’,
‘dotted’). One may specify customized dash styles by providing
a tuple of (offset, dash pairs). For example, the predefiend
<codeclass="descname">set_linewidth</code><spanclass="sig-paren">(</span><em>w</em><spanclass="sig-paren">)</span><aclass="headerlink" href="#matplotlib.backend_bases.GraphicsContextBase.set_linewidth" title="Permalink to this definition">¶</a></dt>