-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Document How-to figure empty #15297
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
Document How-to figure empty #15297
Conversation
@@ -1,7 +1,7 @@ | |||
.. _howto-faq: | |||
|
|||
****** | |||
How-To | |||
How-to |
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.
We only capitalize the first letter in headings (also looks better IMHO).
dca8860
to
91b6770
Compare
.. _howto-figure-empty: | ||
|
||
Check whether a figure is empty | ||
------------------------------- |
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.
So, the next section uses findobj
, can these two sections not be combined?
I think it would be nice if this info also went into figure.findobj
. I was a little confused by this - I'd have just checked figure.get_children()
findobj
traverses the whole tree, I suspect needlessly for this case?
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, get_children()
is sufficient. Thanks, changed.
I don't know how to combine these sections - maybe don't have to anymore because they now use different methods. Will modify docstrings in a separate PR. Otherwise we can't port this back to the doc branch.
91b6770
to
7b4ce9d
Compare
@timhoffm, Looks good to me! |
…297-on-v3.1.1-doc Backport PR #15297 on branch v3.1.1-doc (Document How-to figure empty)
…297-on-v3.1.x Backport PR #15297 on branch v3.1.x (Document How-to figure empty)
Net changes: - whitespace in mpl.css and layout.html - content from #15297 was backported to v3.1.x but not v3.2.x Conflicts: .travis.yml - kept v3.2.x version, script changed to case statement not if-else doc/_static/mpl.css - whitespace related conflicts doc/_templates/layout.html - whitespace related conflicts doc/index.rst - join our community section completely re-written, kept 3.2.x version doc/devel/documenting_mpl.rst lib/matplotlib/backend_bases.py lib/matplotlib/rcsetup.py lib/matplotlib/tests/test_axes.py lib/matplotlib/tests/test_backend_qt.py lib/matplotlib/tests/test_backend_webagg.py lib/matplotlib/tests/test_image.py - kept v3.2.x version
PR Summary
This adds a how-to entry on checking whether a figure is empty. Closes #15256. See discussion there.
@vanillajonathan does this address your documentation wishes?