mpl gui#
Show#
Show the figures and maybe block. |
Interactivity#
Enable interactive mode. |
|
Disable interactive mode. |
|
Return whether plots are updated after every plotting command. |
Figure Fabrication#
Un-managed#
Create a new figure |
|
Create a figure and a set of subplots. |
|
Build a layout of Axes based on ASCII art or nested lists. |
Create a new figure manager instance. |
Managed#
- class mpl_gui.FigureRegistry(*, block=None, timeout=0, prefix='Figure ')[source]#
Bases:
object
A registry to wrap the creation of figures and track them.
This instance will keep a hard reference to created Figures to ensure that they do not get garbage collected.
- Parameters:
- blockbool, optional
Whether to wait for all figures to be closed before returning from show_all.
If
True
block and run the GUI main loop until all figure windows are closed.If
False
ensure that all figure windows are displayed and return immediately. In this case, you are responsible for ensuring that the event loop is running to have responsive figures.Defaults to True in non-interactive mode and to False in interactive mode (see
is_interactive
).- timeoutfloat, optional
Default time to wait for all of the Figures to be closed if blocking.
If 0 block forever.
Create a new figure |
|
Create a figure and a set of subplots. |
|
Build a layout of Axes based on ASCII art or nested lists. |
|
Return a dictionary of the current mapping labels -> figures. |
|
Show all of the Figures that the FigureRegistry knows about. |
|
Close all Figures know to this Registry. |
- class mpl_gui.FigureContext(*, forgive_failure=False, **kwargs)[source]#
Bases:
FigureRegistry
Extends FigureRegistry to be used as a context manger.
All figures known to the Registry will be shown on exiting the context.
- Parameters:
- blockbool, optional
Whether to wait for all figures to be closed before returning from show_all.
If
True
block and run the GUI main loop until all figure windows are closed.If
False
ensure that all figure windows are displayed and return immediately. In this case, you are responsible for ensuring that the event loop is running to have responsive figures.Defaults to True in non-interactive mode and to False in interactive mode (see
is_interactive
).- timeoutfloat, optional
Default time to wait for all of the Figures to be closed if blocking.
If 0 block forever.
- forgive_failurebool, optional
If True, block to show the figure before letting the exception propagate
Select the backend#
Select the GUI toolkit to use. |