add 'auto' state for boxplot's patch_artist by saranti · Pull Request #28420 · matplotlib/matplotlib · GitHub
Skip to content

add 'auto' state for boxplot's patch_artist - #28420

Draft
saranti wants to merge 1 commit into
matplotlib:mainfrom
saranti:patchartist
Draft

saranti wants to merge 1 commit into
matplotlib:mainfrom
saranti:patchartist

Conversation

@saranti

@saranti saranti commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

PR summary

In #17959, it was generally agreed that it should be simpler to set the facecolor on a boxplot. I went with @timhoffm's idea to change the default to patch_artist='auto' which would use patches if any of the given parameters requires patches.

The 2 boxprops parameters that require a Patch artist are facecolor and edgecolor. If any of those 2 are passed, patch_artist will auto default to True. Otherwise, the rcparam will be respected.

PR checklist

@anntzer

anntzer commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

@saranti

saranti commented Jun 19, 2024

Copy link
Copy Markdown
Contributor Author

I'll look into it

Edit: Always using a patch gives us a problem when someone tries to customize the box using setp or tries to call a Line2d method on the box, like in the IID bootstrap example. I don't see a way around that.

@saranti
saranti marked this pull request as draft June 19, 2024 09:59
@saranti saranti added the status: needs comment/discussion needs consensus on next step label Jun 23, 2024
@saranti
saranti requested a review from anntzer June 25, 2024 15:11
@anntzer

anntzer commented Jul 22, 2024

Copy link
Copy Markdown
Contributor

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