-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix spy(..., marker=<not-None>, origin="lower") #16265
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
Conversation
and validate the origin kwarg both for spy() and for imshow(). There are some other slightly questionable choices in spy() (e.g. always calling `xaxis.set_ticks_position("both")` but not doing the same for the yaxis), but let's leave this as is for now.
@@ -7560,6 +7555,11 @@ def spy(self, Z, precision=0, marker=None, markersize=None, | |||
non-square pixels. | |||
- *None*: Use :rc:`image.aspect`. | |||
|
|||
origin : {'upper', 'lower'}, default: :rc:`image.origin` |
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.
this just makes the doc order match the signature order.
self.title.set_y(1.05) | ||
self.xaxis.tick_top() | ||
if origin == "upper": |
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.
This seems like an additional change in behavior?
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.
that was explicitly mentioned in the report ("Though it's worth pointing out that the x-axis ticks and labels always end up in upper spine, not the lower one, regardless of origin='upper' or origin='lower'. The behavior of imshow is a bit different. If origin='lower', the ticks and labels are moved to the bottom.") and clearly looks like an error 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.
👍
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.
Modulo comment about the change in behavior of where the x tick labels go.
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.
with no reservations.
and validate the origin kwarg both for spy() and for imshow().
There are some other slightly questionable choices in spy() (e.g. always
calling
xaxis.set_ticks_position("both")
but not doing the same forthe yaxis), but let's leave this as is for now.
Closes #16252.
PR Summary
PR Checklist