-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate TextWithDash. #13548
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
Deprecate TextWithDash. #13548
Conversation
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.
Seems reasonable to me.
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.
Test failures look real.
good catch, should be fixed now (it was due to an awkward interaction between delete_parameter and the pyplot wrapper for text()). |
What do you intend to do with the example that uses this functionality? Rewrite in terms of |
TextWithDash appears to be an ancestral version of Annotation that was added over two commits in 2005 (6a4d343, fe80816), revised once in 2006 and another time in 2008, and never touched since then. While it "works", its implementation is 400 lines long, it is only mentioned by a single example (dashpointlabel.py), somewhat complicates Axes.text(), and is likely rarely used and replaceable by Annotation for most use cases. Hence, deprecate it, keeping open the option to undeprecate if this turns out to be too disruptive.
I added a filter to hide the warning from the example output, but have it in the generated plot instead. I'd just delete the example once withdash goes away; there's more than enough annotate() examples lying around. |
…548-on-v3.1.x Backport PR #13548 on branch v3.1.x (Deprecate TextWithDash.)
TextWithDash appears to be an ancestral version of Annotation that was
added over two commits in 2005 (6a4d343, fe80816), revised once in 2006
and another time in 2008, and never touched since then.
While it "works", its implementation is 400 lines long, it is only
mentioned by a single example (dashpointlabel.py), somewhat complicates
Axes.text() (#12215), and is likely rarely used and replaceable by Annotation for
most use cases.
Hence, deprecate it, keeping open the option to undeprecate if this
turns out to be too disruptive. (I suggest to get the deprecation in 3.1
to give longer notice to users; I don't mind a longer deprecation period
(in numbers of minor releases) here.)
PR Summary
PR Checklist