Skip to content

Restructure interface section of API Reference index page #26402

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
Aug 8, 2023

Conversation

timhoffm
Copy link
Member

Comment on lines 65 to 68
^^^^^^^^^^^^^^^^
Examples:

`matplotlib.pyplot` is a collection of functions that make
Matplotlib work like MATLAB. Each pyplot function makes some change to a
figure: e.g., creates a figure, creates a plotting area in a figure, plots
some lines in a plotting area, decorates the plot with labels, etc.
- Most :ref:`examples <examples-index>` use this

`.pyplot` is mainly intended for interactive plots and simple cases of
programmatic plot generation.
(except for the pyplot section)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need this, and for a general audience I'd maybe just point to the plot types gallery and the new user guide examples

Copy link
Member Author

Choose a reason for hiding this comment

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

I was a bit bolder now and removed the exmaples here completely. This page is the API reference and serves the purpose to navigate people to the relevant parts of the API docs. The different interfaces are only relevant here to the extent that people know the rough context whether they want to go to Axes or pyplot. The focus is on API lookup, not on learning. Therefore, I don't think example links are needed here. - And I have to say, I really like the now compact version better.

Copy link
Member

Choose a reason for hiding this comment

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

I think if you want to go even more compact, you can probably incorporate the info in the bulleted list into the bottom of each grid cell and then remove the list all together.

@timhoffm timhoffm force-pushed the interface-naming branch 2 times, most recently from e272b5c to bab0b5b Compare July 28, 2023 23:20
- switch to Axes interface / pyplot interface terminology (matplotlib#26388)
- Reduce the interface description to very compact
  two-sentence descriptions and refer to the interface
  page for everything else.

  The focus here is to point the users to relevant API resources
  for the respective interfaces, not to discuss these interfaces
  in detail. The latter is the task of
  https://matplotlib.org/devdocs/users/explain/figure/api_interfaces.html
  and I will add some missing pieces there in a follow-up PR.

  Co-authored-by: hannah <story645@gmail.com>
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

Can merge or make final tweaks then merge-I'll merge tomorrow otherwise and tweaks can happen on follow up.


API:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
API:

looking in the rendered docs, it totally doesn't need it.

@tacaswell tacaswell merged commit 59b01a1 into matplotlib:main Aug 8, 2023
@tacaswell tacaswell added this to the v3.8.0 milestone Aug 8, 2023
@timhoffm timhoffm deleted the interface-naming branch August 8, 2023 22:21
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