add 'auto' state for boxplot's patch_artist
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
- [ ] "closes #0000" is in the body of the PR description to link the related issue
- [ ] new and changed code is tested
- [ ] Plotting related features are demonstrated in an example
- [ ] New Features and API Changes are noted with a directive and release note
- [ ] Documentation complies with general and docstring guidelines
I didn't look into this in detail, but would it be possible to just always switch to using a patch artist, using a strategy similar to #24455/#25247 ("auto-switch back to the old kind if the user tries to access the object") during the transition period?
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.
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.
The point would be to auto-backconvert (with warning) to the "old" form if that happens, as in #24455/#25247.