Skip to content

Commit

Permalink
Better document the relation between figure and manager
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Feb 12, 2024
1 parent d2cc4d0 commit 585bdce
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2607,9 +2607,13 @@ class FigureManagerBase:
backend-independent way. It's an adapter for the real (GUI) framework that
represents the visual figure on screen.
GUI backends define from this class to translate common operations such
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 an can just use the base class.
support these operations and can just use the base class.
This following basic operations are accessible:
Expand Down Expand Up @@ -2794,6 +2798,11 @@ def set_window_title(self, title):
Set the title text of the window containing the figure.
This has no effect for non-GUI (e.g., PS) backends.
Examples
--------
>>> fig = plt.figure()
>>> fig.canvas.manager.set_window_title('My figure')
"""


Expand Down

0 comments on commit 585bdce

Please sign in to comment.