matplotlib.backends.backend_webagg_core
#
Displays Agg images in the browser, with interactivity.
- matplotlib.backends.backend_webagg_core.FigureCanvas[source]#
alias of
FigureCanvasWebAggCore
- class matplotlib.backends.backend_webagg_core.FigureCanvasWebAggCore(*args, **kwargs)[source]#
Bases:
FigureCanvasAgg
- draw()[source]#
Render the
Figure
.This method must walk the artist tree, even if no output is produced, because it triggers deferred work that users may want to access before saving output to disk. For example computing limits, auto-limits, and tick values.
- draw_idle()[source]#
Request a widget redraw once control returns to the GUI event loop.
Even if multiple calls to
draw_idle
occur before control returns to the GUI event loop, the figure will only be rendered once.Notes
Backends may choose to override the method and implement their own strategy to prevent multiple renderings.
- manager_class[source]#
alias of
FigureManagerWebAgg
- set_cursor(cursor)[source]#
Set the current cursor.
This may have no effect if the backend does not display anything.
If required by the backend, this method should trigger an update in the backend event loop after the cursor is set, as this method may be called e.g. before a long-running task during which the GUI is not updated.
- Parameters:
- cursor
Cursors
The cursor to display over the canvas. Note: some backends may change the cursor for the entire window.
- cursor
- set_image_mode(mode)[source]#
Set the image mode for any subsequent images which will be sent to the clients. The modes may currently be either 'full' or 'diff'.
Note: diff images may not contain transparency, therefore upon draw this mode may be changed if the resulting image has any transparent component.
- supports_blit = False#
- matplotlib.backends.backend_webagg_core.FigureManager[source]#
alias of
FigureManagerWebAgg
- class matplotlib.backends.backend_webagg_core.FigureManagerWebAgg(canvas, num)[source]#
Bases:
FigureManagerBase
- ToolbarCls[source]#
alias of
NavigationToolbar2WebAgg
- get_window_title()[source]#
Return the title text of the window containing the figure, or None if there is no window (e.g., a PS backend).
- set_window_title(title)[source]#
Set the title text of the window containing the figure.
This has no effect for non-GUI (e.g., PS) backends.
- show()[source]#
For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception, unless running headless (i.e. on Linux with an unset DISPLAY); this exception is converted to a warning in
Figure.show
.
Bases:
NavigationToolbar2
Draw a rectangle rubberband to indicate zoom limits.
Note that it is not guaranteed that
x0 <= x1
andy0 <= y1
.
Toggle the pan/zoom tool.
Pan with left button, zoom with right.
Remove the rubberband.
Save the current figure
Enable or disable the back/forward button.
Display a message on toolbar or in status bar.
- class matplotlib.backends.backend_webagg_core.TimerAsyncio(*args, **kwargs)[source]#
Bases:
TimerBase
- Parameters:
- intervalint, default: 1000ms
The time between timer events in milliseconds. Will be stored as
timer.interval
.- callbackslist[tuple[callable, tuple, dict]]
List of (func, args, kwargs) tuples that will be called upon timer events. This list is accessible as
timer.callbacks
and can be manipulated directly, or the functionsadd_callback
andremove_callback
can be used.
- class matplotlib.backends.backend_webagg_core.TimerTornado(*args, **kwargs)[source]#
Bases:
TimerBase
- Parameters:
- intervalint, default: 1000ms
The time between timer events in milliseconds. Will be stored as
timer.interval
.- callbackslist[tuple[callable, tuple, dict]]
List of (func, args, kwargs) tuples that will be called upon timer events. This list is accessible as
timer.callbacks
and can be manipulated directly, or the functionsadd_callback
andremove_callback
can be used.