-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
There was a problem hiding this 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?
There was a problem hiding this 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.
lib/matplotlib/pylab.py
Outdated
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. |
There was a problem hiding this comment.
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>
Thanks for the reviews, I've rephrased the whole docstring, an in there tried to take your comments into account. |
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