Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use set_window_title rather than set_label to set title of webagg figure#29338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletionsdoc/api/next_api_changes/behavior/29256_IMT.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
Setting titles of figures using webagg backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Previously when using the ``webagg`` backend the title of a figure was set using
``figure.set_label``. Now it is set using ``figure.canvas.manager.set_window_title``
which is more consistent with other backends.
6 changes: 2 additions & 4 deletionslib/matplotlib/backends/backend_webagg_core.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -328,10 +328,8 @@
getattr(self.toolbar, event['name'])()

def handle_refresh(self, event):
figure_label = self.figure.get_label()
if not figure_label:
figure_label = f"Figure {self.manager.num}"
self.send_event('figure_label', label=figure_label)
if self.manager:
self.send_event('figure_label', label=self.manager.get_window_title())

Check warning on line 332 in lib/matplotlib/backends/backend_webagg_core.py

View check run for this annotation

Codecov/ codecov/patch

lib/matplotlib/backends/backend_webagg_core.py#L332

Added line #L332 was not covered by tests
self._force_full = True
if self.toolbar:
# Normal toolbar init would refresh this, but it happens before the
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp