-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update plt.figure() docstring. #22420
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
lib/matplotlib/pyplot.py
Outdated
|
||
**kwargs : optional | ||
See `~.matplotlib.figure.Figure` for other possible arguments. | ||
Additional kwargs will be passed to the `.Figure` constructor. |
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.
Additional kwargs will be passed to the `.Figure` constructor. | |
Additional keyword arguments will be passed to the `.Figure` constructor. |
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.
yes
lib/matplotlib/pyplot.py
Outdated
|
||
Notes | ||
----- | ||
Newly created figures will be passed to the ``new_figure_manager`` function | ||
provided by the current backend, which will install a canvas and a manager |
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.
Is it possible to link out to something here? Otherwise these terms aren't very meaningful to most people.
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.
Sure, linked https://matplotlib.org/stable/api/backend_template_api.html#matplotlib.backends.backend_template.new_figure_manager which I think is the best for now.
- Don't suggest using backends for customization (it's quite heavy handed anyways, and we may soon have figure hooks to simplify that). - Replace tight_layout/constrained_layout by layout engines (none of the kwargs appear explicitly in the signature, but because figure() is such a central entry point, it seems reasonable to be a bit more wordy in the descriptions).
handed anyways, and we may soon have figure hooks to simplify that).
kwargs appear explicitly in the signature, but because figure() is
such a central entry point, it seems reasonable to be a bit more wordy
in the descriptions).
PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).