Skip to content

Move pylab documentation to its own module page #26396

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
Jul 27, 2023

Conversation

timhoffm
Copy link
Member

Previously, pylab was not listed under modules, but the module docstring (and thus also the target of pylab links) was on the API Reference top page.

While pylab is discouraged, it's still a regular module and should be handled as such. Even more importantly, by removing the pylab section from the API reference top page, we de-emphasize it. Note, that pylab is still mentioned in the more in-depth backend discussion at https://matplotlib.org/devdocs/users/explain/figure/api_interfaces.html

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Seems good. A link to the API discussion can't hurt?

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.

Lots of comments, I don't mind pushing to this PR if you think the feedback makes sense.

The wildcard import will overwrite some builtin functions (e.g. the builtin `sum`
will be replaced by `numpy.sum`). This can lead to unexpected behavior.

The use of pylab is strongly discouraged. Use `matplotlib.pyplot` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Put as part of the first sentence - if they're looking for pyplot they'll just go there instead.

Previously, pylab was not listed under modules, but the module docstring
(and thus also the target of pylab links) wa on the API Reference top
page.

While pylab is discouraged, it's still a regular module and should be
handled as such. Even more importantly, by removing the pylab section
from the API reference top page, we de-emphasize it. Note, that pylab is
still mentioned in the more in-depth backend discussion at
https://matplotlib.org/devdocs/users/explain/figure/api_interfaces.html

Co-authored-by: hannah <story645@gmail.com>
Co-authored-by: Jody Klymak <jklymak@gmail.com>
@timhoffm
Copy link
Member Author

Thanks for the reviews, I've rephrased the whole docstring, an in there tried to take your comments into account.

@story645 story645 merged commit 72578a7 into matplotlib:main Jul 27, 2023
@timhoffm timhoffm deleted the pylab branch July 27, 2023 18:38
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