Skip to content

Commit

Permalink
Merge pull request #27777 from meeseeksmachine/auto-backport-of-pr-27…
Browse files Browse the repository at this point in the history
…776-on-v3.8.x

Backport PR #27776 on branch v3.8.x (Better document the relation between figure and manager)
  • Loading branch information
timhoffm committed Feb 12, 2024
2 parents 4591c5b + ae7a8dc commit 87a52b5
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 @@ -2584,9 +2584,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 @@ -2771,6 +2775,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 87a52b5

Please sign in to comment.