Skip to content

DOC: clarify what we mean by object oriented in pyplot api #21093

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 1 commit into from
Sep 19, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Sep 16, 2021

PR Summary

Currently: https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.html#module-matplotlib.pyplot

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak jklymak added this to the v3.5.0 milestone Sep 16, 2021
@jklymak jklymak force-pushed the doc-clarify-object-oriented branch from 74ba846 to 8c745e8 Compare September 16, 2021 11:17
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

This is ok as an improvement, and can be merged for 3.5.

However, in the long run, it would be better to improve https://matplotlib.org/devdocs/api/index.html and link there.

@jklymak
Copy link
Member Author

jklymak commented Sep 17, 2021

I don't have access to the file you are linking. However in general I don't think there is any harm in repeating concepts in a few key places.

@timhoffm
Copy link
Member

Sorry, I accidentally copied the link from a local doc build. Fixed above.

I think mentioning and cross-linking is better than half-touching a topic. It's easier to maintain. And we can keep the focus on the kind of documentation. The pyplot page here is primarily for reference documentation, but the added content is conceptual or maybe how to use.

@jklymak
Copy link
Member Author

jklymak commented Sep 17, 2021

We have had significant confusion from folks about statements like "the object oriented API is preferred..." then being confused why we use pyplot in almost every example. This modification guides people to the idea that there are currently two points to the pyplot module.

As discussed numerous times, the hope is to disambiguate these two concepts. But in the meantime I think it's helpful to be explicit and include explicit examples of the the two usages.

@jklymak jklymak force-pushed the doc-clarify-object-oriented branch from 1b2de64 to f9e884d Compare September 17, 2021 12:02
@jklymak jklymak force-pushed the doc-clarify-object-oriented branch from a0f51d3 to de80ee4 Compare September 19, 2021 08:11
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
@jklymak jklymak force-pushed the doc-clarify-object-oriented branch from de80ee4 to 979fe94 Compare September 19, 2021 08:15
@timhoffm timhoffm merged commit b26dbcd into matplotlib:master Sep 19, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 19, 2021
timhoffm added a commit that referenced this pull request Sep 19, 2021
…093-on-v3.5.x

Backport PR #21093 on branch v3.5.x (DOC: clarify what we mean by object oriented in pyplot api)
@jklymak jklymak deleted the doc-clarify-object-oriented branch September 20, 2021 07:48
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Oct 12, 2021
…riented

DOC: clarify what we mean by object oriented in pyplot api
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
DOC: clarify what we mean by object oriented in pyplot api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants