Shadow patch now initializes zorder behind argument patch#9435
Shadow patch now initializes zorder behind argument patch#9435dstansby merged 1 commit intomatplotlib:masterfrom clintval:cv_shadow_patch_zorder_init
Conversation
|
@jklymak Is an image 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 the |
|
@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! |
|
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). |
|
Thanks a lot @clintval! |
PR Summary
When initializing a
patch.Shadowinstance the object inherits the same zorder as the passed patch. This behavior draws the two patches in the same plane. This PR initializes thepatch.Shadowto take the next smallerzorderby default.This fixes an issue about zorder stacking for Shadow patches referenced here: #9377
PR Checklist