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

Shadow patch now initializes zorder behind argument patch#9435

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
dstansby merged 1 commit intomatplotlib:masterfromclintval:cv_shadow_patch_zorder_init
Oct 19, 2017
Merged

Shadow patch now initializes zorder behind argument patch#9435

dstansby merged 1 commit intomatplotlib:masterfromclintval:cv_shadow_patch_zorder_init
Oct 19, 2017

Conversation

clintval
Copy link
Contributor

@clintvalclintval commentedOct 16, 2017
edited by NelleV
Loading

PR Summary

When initializing apatch.Shadow instance the object inherits the same zorder as the passed patch. This behavior draws the two patches in the same plane. This PR initializes thepatch.Shadow to take the next smallerzorder by default.


This fixes an issue about zorder stacking for Shadow patches referenced here:#9377

PR Checklist

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

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

Can you write an image test for the correct behaviour? Maybe make sense to merge this and#9426 so the test works? I think the test makes sense in `matplotlib/lib/tests/test_patches.py

@afvincent
Copy link
Contributor

@jklymak Is animage test really necessary (I think that we are currently trying to avoid as much as possible these kinds of test, that are bloating a bit the git historic)? Couldn't one simply test that after init the z-order of theShadow instance indeed smaller than the z-order of the parent patch?

@jklymak
Copy link
Member

@afvincent I guess I was also worried about the transform issue in#9426 but maybe both can be finessed without an actual image test? But sure, just checking that the zorders are ordered properly is great!

@anntzer
Copy link
Contributor

anntzer commentedOct 16, 2017
edited
Loading

I think that the best way is (as mentioned in a few other places) to have an "as if" test: generate figure 1 with the shadow created before the rectangle is added (the previously failing case) and figure 2 with two manually positioned rectangles with the correct zorder and correct positions. It's a bit tricky to write though and I'm fine with taking care of it in#9426 (after this PR gets merged).

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

OK, then I approve this if a test is put into#9426....

@dstansby
Copy link
Member

Thanks a lot@clintval!

clintval reacted with thumbs up emoji

@dstansbydstansby added this to thev2.2 milestoneOct 19, 2017
@dstansbydstansby merged commit9ea08fb intomatplotlib:masterOct 19, 2017
@clintvalclintval deleted the cv_shadow_patch_zorder_init branchOctober 19, 2017 09:26
@QuLogicQuLogic modified the milestones:needs sorting,v2.2.0Feb 12, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

6 participants
@clintval@afvincent@jklymak@anntzer@dstansby@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp