-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Let connectionpatch be drawn on figure level #15020
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let connectionpatch be drawn on figure level #15020
Conversation
@@ -396,6 +396,18 @@ def test_connection_patch(): | |||
ax2.add_artist(con) | |||
|
|||
|
|||
def test_connection_patch_fig(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need some sort of image test as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously it would error out, so I added this just as a smoke test to make sure it doesn't. The functionality should be sufficiently tested by the other image test.
I mean, I could of course add this to the existing image test (just being lazy here); if people find it necessary, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you if you think this will keep it from getting broken is the only reason we have tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd say this is sufficient to test what's being changed here. Of course one could argue that in general we do not test all of the possible combinations of parameters, and for each with and without contrained_layout, etc...
6898022
to
03c88e8
Compare
…020-on-v3.1.x Backport PR #15020 on branch v3.1.x (Let connectionpatch be drawn on figure level)
PR Summary
Previously adding a ConnectionPatch to a figure as
fig.add_artist(ConnectionPatch(..))
would fail with an error (error shown in #8744 (comment)).However it would be good to be able to use ConnectionPatch on a figure level because
Thereby closes #8744 in the sense that we would advise users to use
fig.add_artist
in such case.Documentation and examples for that would be part of #14957
PR Checklist