Skip to content

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

Merged
timhoffm merged 1 commit into
matplotlib:masterfrom
jklymak:doc-clarify-object-oriented
Sep 19, 2021
Merged

timhoffm merged 1 commit into
matplotlib:masterfrom
jklymak:doc-clarify-object-oriented

Conversation

@jklymak

@jklymak jklymak commented Sep 16, 2021

Copy link
Copy Markdown
Member

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
Comment thread lib/matplotlib/pyplot.py Resolved
Comment thread lib/matplotlib/pyplot.py Resolved
Comment thread lib/matplotlib/pyplot.py Resolved

@timhoffm timhoffm left a comment •

Copy link
Copy Markdown
Member

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

jklymak commented Sep 17, 2021

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

jklymak commented Sep 17, 2021

Copy link
Copy Markdown
Member Author

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
Comment thread lib/matplotlib/pyplot.py Resolved
@jklymak
jklymak force-pushed the doc-clarify-object-oriented branch from a0f51d3 to de80ee4 Compare September 19, 2021 08:11
@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