🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@QuLogic
Copy link
Member

@QuLogic QuLogic commented Jun 17, 2020

PR Summary

Starting with #16098, extra keyword arguments are now processed, but that means that default colours and alpha are not set. Instead, those properties should only be overridden if specified.

As a proof that this works as one might expect, change the Shadow call in pie to use keyword arguments instead of .set.

This is not a perfect match to previous behaviour, but at least makes the constructor work in an expected manner.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

QuLogic added 2 commits June 16, 2020 23:38
Starting with matplotlib#16098, extra keyword arguments are now processed, but
that means that default colours and alpha are not set. Instead, those
properties should only be overridden if specified.
A `Shadow` already sets zorder immediately below its parent patch, so
that's no longer necessary.
@QuLogic QuLogic added this to the v3.3.0 milestone Jun 17, 2020
# figure and transform props will be set.
shad = mpatches.Shadow(w, -0.02, -0.02)
shad.set(zorder=0.9 * w.get_zorder(), label='_nolegend_')
shad = mpatches.Shadow(w, -0.02, -0.02, label='_nolegend_')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don‘t we need zorder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shadow sets a default zorder (immediately below the parent patch) that's better than this manually calculated one.

@tacaswell tacaswell merged commit 6e7dd77 into matplotlib:master Jun 17, 2020
@QuLogic QuLogic deleted the pie-shadow branch June 17, 2020 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants