Skip to content

Clarify semantics of plt.matshow(..., fignum=...). #27244

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Nov 1, 2023

The semantics of the fignum parameter are rather confusing, per #22972 (in particular wrt. whether the figure gets resized or not -- it only does if fignum=(None or a non-existing figure number) (which creates a new figure), but not if fignum=0 (which also creates a new figure).

It's probably not worth fixing that (if anything we should just point users to Axes.matshow, which is just fine), but we can still improve the documentation.

PR summary

PR checklist

The semantics of the fignum parameter are rather confusing (in
particular wrt. whether the figure gets resized or not -- it only does
if fignum=(None or a non-existing figure number) (which creates a new
figure), but not if fignum=0 (which also creates a new figure).

It's probably not worth fixing that (if anything we should just point
users to Axes.matshow, which is just fine), but we can still improve the
documentation.
@tacaswell tacaswell added this to the v3.8.2 milestone Nov 1, 2023
@tacaswell tacaswell merged commit 09c7b7b into matplotlib:main Nov 1, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 1, 2023
@anntzer anntzer deleted the pm branch November 1, 2023 22:19
QuLogic added a commit that referenced this pull request Nov 1, 2023
…244-on-v3.8.x

Backport PR #27244 on branch v3.8.x (Clarify semantics of plt.matshow(..., fignum=...).)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants