-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Unexpected behavior for Axes.quiver(transform=None) #11153
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
Comments
I don't know: transform=None -> IdentityTransform throughout. I agree that your convention would be better, but thats not where we are at. Not sure why quiver would be special. matplotlib/lib/matplotlib/artist.py Lines 313 to 320 in 77ca117
|
I find the semantics of Because there has been a decision at some point to break the natural semantics and use the mapping |
However, we use it almost everywhere as "use default property". Some places use the string 'none' to mark "no such property". I suppose the affected user code will be little. You have to explicitly use |
Yes, in this case it would probably be ok and wouldn't break anything. But if you only change it here, things become even more inconsistent. There are other cases where the default is None, and you would need to check them all not to break anything. |
I favor @timhoffm's proposal. |
That may be true for most other cases, but not for transform (as commented twice about already). So you should not make |
OK, after a discussion with @jklymak I have decided to close this, recommending that Quiver be left as-is in this respect. I note that quiver does not expose |
Bug report
Bug summary
I would expect that
Axes.quiver(transform=None)
would behave the same as leaving out the kwarg transform (None implying default). However this is not the case. Instead the default for a missing transform isAxes.transData
.As far as I understand, there is no reasonable semantics of an explicit
transform=None
here (except for 'use default'). It's probably an unintended implementation detail.I therefore propose to change the behavior of
Axes.quiver(transform=None)
to be the same as leaving out the kwarg. This would allow further code simplification with explicit kwargs (#11145).Code for reproduction
Expected: All there Axes should be equal.
The text was updated successfully, but these errors were encountered: