-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MNT: deprecate arrow #22382
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
MNT: deprecate arrow #22382
Conversation
47dcd04
to
348d1d0
Compare
I can't remember where this was discussed but I always thought that a problem here is that arrow is explicitly for when the data should be visualized as arrows; annotation doesn't make sense because folks aren't trying to annotate anything. I also forgot why quivers don't work here and this was maybe as part of a request for a vector like thing. But I do agree on maybe consolidating the underlying primitive/patch to just one type if possible. |
The fundamental problem with This is solved by See https://matplotlib.org/stable/gallery/shapes_and_collections/arrow_guide.html#arrow-guide for a description of the existing possibilities.
Ideally, The above methods are for "create a single arrow from (x,y) to (x2, y2)". |
It was decided in the dev call today that we want to deprecate As an alternative, we want to introduce a similar replacement The |
@timhoffm,
These are all default behaviors for |
We can easily extend the deprecation period. I think discussion of the new vector method should perhaps get its own issue.
Just to be clear, I don't think the arrow deprecation needs to wait for |
d6318a1
to
5801bfa
Compare
I beg to differ. #22390 (comment) explains that |
My point is that there is nothing to fully replace: arrow is fundamentally broken. The proposed vector is a great enhancement proposal, but whether anyone pushes that through or not doesn't obviate the need to get rid of arrow. |
Of course there is on 1:1 replacement because the rendering is broken. But conceptually, you can do 70% with When we deprecate, I want to be able to direkt users to the 70% + 20% alternative. Arrow has been in for decades and has apparently quite some usages despite its shortcomings. There is no hurry to to take it away and we have to provide an as good as possible migration path for the existing users. In practice, I suppose that we can get vector into 3.6 so there should be no difference to the user. But technically, IMHO the deprecation should depend on the vector introduction. If we don't get vector into 3.6, the deprecation should be delayed as well. |
Sure, well we can close this, but I'm not holding my breath over the long-standing problem getting fixed. |
PR Summary
Closes #20387
ax.arrow
is fundamentally broken, and only works for certain types of axes; users should useannotate
instead. Not deprecatingFancyArrow
, but maybe that should happen too.PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).