Participer au site avec un Tip
Rechercher
 

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 :

Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé
Module « matplotlib.pyplot »

Classe « FigureManagerBase »

Informations générales

Héritage

builtins.object
    FigureManagerBase

Définition

class FigureManagerBase(builtins.object):

help(FigureManagerBase)

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)

Constructeur(s)

Signature du constructeur Description
__init__(self, canvas, num)

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
create_with_canvas(canvas_class, figure, num)
destroy(self)
full_screen_toggle(self)
get_window_title(self)
pyplot_show(*, block=None)
resize(self, w, h) For GUI backends, resize the window (in physical pixels). [extrait de resize.__doc__]
set_window_title(self, title)
show(self)
start_main_loop()

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __init_subclass__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé