Vous avez des améliorations (ou des corrections) à proposer pour ce document :
je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
A backend-independent abstraction of a figure container and controller.
The figure manager is used by pyplot to interact with the window in a
backend-independent way. It's an adapter for the real (GUI) framework that
represents the visual figure on screen.
The figure manager is connected to a specific canvas instance, which in turn
is connected to a specific figure instance. To access a figure manager for
a given figure in user code, you typically use ``fig.canvas.manager``.
GUI backends derive from this class to translate common operations such
as *show* or *resize* to the GUI-specific code. Non-GUI backends do not
support these operations and can just use the base class.
This following basic operations are accessible:
**Window operations**
- `~.FigureManagerBase.show`
- `~.FigureManagerBase.destroy`
- `~.FigureManagerBase.full_screen_toggle`
- `~.FigureManagerBase.resize`
- `~.FigureManagerBase.get_window_title`
- `~.FigureManagerBase.set_window_title`
**Key and mouse button press handling**
The figure manager sets up default key and mouse button press handling by
hooking up the `.key_press_handler` to the matplotlib event system. This
ensures the same shortcuts and mouse actions across backends.
**Other operations**
Subclasses will have additional attributes and functions to access
additional functionality. This is of course backend-specific. For example,
most GUI backends have ``window`` and ``toolbar`` attributes that give
access to the native GUI widgets of the respective framework.
Attributes
----------
canvas : `FigureCanvasBase`
The backend-specific canvas instance.
num : int or str
The figure number.
key_press_handler_id : int
The default key handler cid, when using the toolmanager.
To disable the default key press handling use::
figure.canvas.mpl_disconnect(
figure.canvas.manager.key_press_handler_id)
button_press_handler_id : int
The default mouse button handler cid, when using the toolmanager.
To disable the default button press handling use::
figure.canvas.mpl_disconnect(
figure.canvas.manager.button_press_handler_id)
Améliorations / Corrections
Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.
Emplacement :
Description des améliorations :