Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

anntzer
Copy link
Contributor

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

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzeranntzer added this to thev3.1.0 milestoneFeb 28, 2019
Copy link
Member

@jklymakjklymak left a 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.

dstansby
dstansby previously requested changesFeb 28, 2019
Copy link
Member

@dstansbydstansby left a 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.

@anntzer
Copy link
ContributorAuthor

good catch, should be fixed now (it was due to an awkward interaction between delete_parameter and the pyplot wrapper for text()).

@ImportanceOfBeingErnest
Copy link
Member

What do you intend to do with the example that uses this functionality? Rewrite in terms ofannotate? Remove completely? Just sgskip-it for now? Let someone else deal with the warnings in the doc-build?

TextWithDash appears to be an ancestral version of Annotation that wasadded over two commits in 2005 (6a4d343,fe80816), revised once in 2006and another time in 2008, and never touched since then.While it "works", its implementation is 400 lines long, it is onlymentioned by a single example (dashpointlabel.py), somewhat complicatesAxes.text(), and is likely rarely used and replaceable by Annotation formost use cases.Hence, deprecate it, keeping open the option to undeprecate if thisturns out to be too disruptive.
@anntzer
Copy link
ContributorAuthor

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.

@ImportanceOfBeingErnestImportanceOfBeingErnest merged commite0d3129 intomatplotlib:masterMar 1, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 1, 2019
@anntzeranntzer deleted the dashless branchMarch 1, 2019 11:36
dstansby added a commit that referenced this pull requestMar 1, 2019
…548-on-v3.1.xBackport PR#13548 on branch v3.1.x (Deprecate TextWithDash.)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@ImportanceOfBeingErnestImportanceOfBeingErnestImportanceOfBeingErnest approved these changes

@dstansbydstansbydstansby left review comments

Assignees
No one assigned
Projects
None yet
Milestone
v3.1.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@ImportanceOfBeingErnest@jklymak@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp