Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecate plotfile. #13740

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

Merged
merged 2 commits into from
May 24, 2019
Merged

Deprecate plotfile. #13740

merged 2 commits into from
May 24, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 22, 2019

as discussed in #12180.

Various replacements are showcased in plotfile_demo_sgskip.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

@WeatherGod
Copy link
Member

WeatherGod commented Mar 22, 2019 via email

@timhoffm
Copy link
Member

Deprecating vs rewriting was 50/50. I was for deprecating because plotfile() does too much and is beyond the scope of matplotlib. It's a chance to cut back on our API.

Disregarding my personal preference, something has to be done about plotfile(). Unless someone volunteers to rewrite it, this deprecation is the practical way to go.

plotfile demo
=============

Replacing the deprecated `plotfile` by pandas or other matplotlib plotting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anntzer This is really a bit difficult to follow. At first glance I was just seeing plotfile all over the place. Are you happy with me rewriting the example to better explain/structure it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timhoffm go for it.

@jklymak
Copy link
Member

jklymak commented Mar 24, 2019

I'll officially change my "vote" in #12180. I think plotfile should go away. Parsing a file is well outside of matplotlib's scope, and much better handled by other libraries.

IF an example is changed, I'd prefer the example uses numpy.csvread or whatever, and then does the plotting in native plotting commands. If we want to show the user how to write a "plotfile" wrapper for a certain format of file, that would be great.

@timhoffm
Copy link
Member

@anntzer can you please rebase on top of master. I'm not sure if I would break things for you if I rebase and then add a commit to enhance the example.

Various replacements are showcased in plotfile_demo_sgskip.
@anntzer
Copy link
Contributor Author

anntzer commented Mar 31, 2019

rebased

@timhoffm
Copy link
Member

timhoffm commented Apr 9, 2019

Added some more explanation. Once plotfile is removed, this can be converted to a general "plotting data from files" example.

@dopplershift
Copy link
Contributor

I'll put in a vote for deprecation:

  1. The status quo is untenable--we can't be relying on other API's we've deprecated
  2. The idea behind plotfile is not a good one, it goes back to trying to do everything
  3. A quick, nonexhaustive check for plt.plotfile on GitHub either gives me false positives or forks of the plotfile_demo.py script

So I'm with @timhoffm. Also, if we deprecate and people scream, we can revisit.

Copy link
Member

@efiring efiring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sooner, the better...

@efiring
Copy link
Member

efiring commented May 22, 2019

@timhoffm Are there critical changes needed for this, or can it be merged as-is?

@timhoffm
Copy link
Member

From my side, this is good enough. We've added a number of examples how to achieve the same functionality as plotfile using numpy or pandas.

@efiring efiring merged commit e6b7090 into matplotlib:master May 24, 2019
@anntzer anntzer deleted the plotfile branch May 24, 2019 22:27
@QuLogic QuLogic added this to the v3.2.0 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants