FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Expand the explanation of the Object-Oriented interface · Issue #18249 · matplotlib/matplotlib · GitHub

Repository navigation

Expand the explanation of the Object-Oriented interface #18249

Closed

Description

Problem

Most of the content of https://matplotlib.org/tutorials/introductory/lifecycle.html#a-note-on-the-object-oriented-api-vs-pyplot will not make sense to a user new matplotlib ( and likely new to python). The text makes several assumptions about the reader:

  • They know what object oriented means
  • They know what a state-based interface is
  • They know what the Matlab interface is like
  • They understand "we utilize an instance of axes.Axes in order to render visualizations on an instance of figure.Figure."
    • Doesn't pyplot also do this under the hood?

As a piece of anecdata I was fairly confused by all of this both years ago when I started using matplotlib and more recently when I started to make more complex and interactive matplotlib plots.

Suggested Improvement

Add deeper explanations/definitions for all the above bullet points. As well it would be great to expand on the note that simply says:

In general, try to use the object-oriented interface over the pyplot interface.

with a justification of that claim.

A related example is https://matplotlib.org/gallery/api/agg_oo_sgskip.html which could also use some more explanation or perhaps removal.

Activity

  1. ianhi commented on Aug 14, 2020

    ContributorAuthor

    Annoyingly this issue was not automatically labelled with the Documentation tag like it should have been following #18161

    I'm trying to look into that but if anyone has any ideas 🤷‍♂️

    edit labelling issue should be fixed by #18250

  2. pspiagicw commented on Nov 8, 2021

    Has this issue been resolved ?

  3. timhoffm commented on Feb 7, 2022

    Member

    AFAICS partially addressed by #21877.

  4. jklymak commented on Feb 18, 2022

    Member

    @ianhi can we close this, or do you have feedback on #21877 which is now in the devdocs: https://matplotlib.org/devdocs/users/explain/api_interfaces.html#matplotlib-application-interfaces-apis That is just a start and we should continue to refine it.

  5. ianhi commented on Mar 5, 2022

    ContributorAuthor

    @jklymak that looks good!

    I do think that that should be linked to from various place in the docs. e.g. the pyplot tutorial: https://matplotlib.org/devdocs/tutorials/introductory/pyplot.html#sphx-glr-tutorials-introductory-pyplot-py which still uses the object-oriented terminology

  6. added a commit that references this issue on Mar 6, 2022
    d5572c0
  7. added this to the v3.6.0 milestone on Mar 6, 2022
  8. added a commit that references this issue on Mar 6, 2022
    512a006
  9. added 11 commits that reference this issue on Apr 19, 2026
    e80d693
    c24087c
    d8ccd0b
    7c913af
    326d8e6
    98bc9f4
    b910b1a
    aebcccd
    9fc1a1b
    1205e43
    71232df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL