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

Fix figure legend when drawing stackplots#30186

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
timhoffm merged 2 commits intomatplotlib:mainfromdstansby:fig-legend-error
Jul 7, 2025

Conversation

@dstansby
Copy link
Member

PR summary

Fixes#30158 - as suggested in#30158 (comment), two calls were trying to set the figure, and Ithink one of them doesn't need to.

PR checklist

@QuLogic
Copy link
Member

Yes, I believe this is correct;HandlerBase.update_prop will set the correct figure (viaLegend._set_artist_props),HandlerPolyCollection._update_prop exists to do the class-specific work of pulling the properties from the first artist in a collection and doesn't need to set the figure.

This could do with a test though.

@rcomer
Copy link
Member

Seems right to me too. The legend and the artists it contains (e.g.legend_handle here) are on the rootFigure, whereasorig_handle is on theSubFigure, so they should not match.

@dstansbydstansby marked this pull request as ready for reviewJuly 6, 2025 20:51
@timhoffmtimhoffm merged commit99b4ee3 intomatplotlib:mainJul 7, 2025
41 checks passed
@tacaswelltacaswell added this to thev3.10.4 milestoneJul 7, 2025
@tacaswell
Copy link
Member

@meeseeksmachine please backport to 3.10.x

@rcomer
Copy link
Member

@meeseeksdev backport to v3.10.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestJul 7, 2025
QuLogic added a commit that referenced this pull requestJul 7, 2025
…186-on-v3.10.xBackport PR#30186 on branch v3.10.x (Fix figure legend when drawing stackplots)
@ksundenksunden mentioned this pull requestAug 7, 2025
5 tasks
ksunden pushed a commit to ksunden/matplotlib that referenced this pull requestAug 21, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@rcomerrcomerrcomer approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

v3.10.5

Development

Successfully merging this pull request may close these issues.

[Bug]: Stackplot in SubFigure raises when drawing Legend

5 participants

@dstansby@QuLogic@rcomer@tacaswell@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp