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

Pyplot gallery section is mostly OO examples · Issue #15922 · matplotlib/matplotlib · GitHub

Repository navigation

Pyplot gallery section is mostly OO examples #15922

Closed

Description

Somewhere between all the convert things to OO and restructure gallery PRs, the pyplot section of the gallery now has very little pyplot content:

PyPlot

OO

I think there should be a standalone pyplot only gallery page, but think for this PR a potential resolution would be to sort the OO examples into the correct sections (possibly combining them with existing content) or altogether remove them if they're not adding any information.

xref: #15355 because I think this contributes to some of the confusion discussed there.

Activity

  1. changed the title [-]Pyplot gallery contains none pyplot images [/-] [+]Pyplot gallery section is mostly OO examples[/+] on Dec 12, 2019
  2. kolibril13 commented on Jan 1, 2020

    Contributor

    From #15938 timhoffm wrote:

    What we can do right now
    In the short term, it would really help to better document the similarities and differences between pyplot and OO style. The current docs are not quite instructive on that; and no matter what we could add immediately what we plan to do in the long term, these are public APIs and will therefore be around for a long time.

    Additional thoughts
    It may even be a good idea to have a complete separation on the API level, in the sense that there should be non-pyplot helper functions for figure/subplot creation (It might be that we still use the same figure management under the hood). That way, one can have two completely separate APIs. Emphasizing this may help to reduce confusion.

    My thought to this:
    Is it possible to have the whole API default to the pyplot style, but every example has a button that switches the code example from pyplot to OO?
    So that people can choose which code they want to see.

  3. timhoffm commented on Jan 2, 2020

    Member

    Thanks for the idea! Unfortunately, switching examples between pyplot and OO is not feasible IMHO.

    • The examples are created from pure python files using sphinx-gallery. The switching mechanism would have to be integrated into that framework.
    • We‘d need two versions of each example. IMHO auto-conversion is not feasible due to the hidden state in pyplot. Creating such a tool would either fail in more complicated cases or be extremely complicated to write. Given the large amount of examples, manually creating and maintaining multiple versions is also not an option.
  4. added
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Sep 28, 2022
  5. jklymak commented on Sep 28, 2022

    Member

    There is some arguing about what should stay or go, but actually fixing this is pretty easy, so marking good first issue

  6. StefRe commented on Sep 28, 2022

    Contributor

    As I'm the culprit of bringing up this topic again in #24023, here's my proposal:

    Example Decision
    Align y-labels move to Text, labels and annotations
    Annotate Transform move to Text, labels and annotations
    Annotating a plot move to Text, labels and annotations
    Annotation Polar move to Text, labels and annotations
    Programmatically controlling subplot adjustment move to Subplots, axes and figures
    Infinite lines keep
    Boxplot Demo move to Statistics remove (same as Boxplots in Statistics)
    Dollar Ticks remove (already covered by Tick formatters in Ticks section in much more detail move to Ticks (the artists tutorial refers to it, so keep it)
    Fig Axes Customize Simple move to Ticks
    Simple axes labels remove it (already covered by "Pyplot Simple" and the second example in Using accented text in Matplotlib example)
    Adding lines to figures move to Miscellaneous
    plot() format string remove and merge into "Pyplot Simple"
    Pyplot Mathtext keep
    Pyplot Simple keep and combine with "plot() format string"
    Pyplot Text keep
    Pyplot Three keep
    Pyplot Two Subplots keep
    Text Commands move to Text, labels and annotations (although there already lots of similar examples there)
    Text Layout remove (duplicate of Text alignment in Text, labels and annotations)
  7. added this to the v3.6.1 milestone on Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL