matplotlib
matplotlib copied to clipboard
Avoid gridspec in more examples
PR Summary
By using subfigures, the new support for height_ratios/width_ratios directly in subplots, or just using subplots.
PR Checklist
Tests and Styling
- [n/a] Has pytest style unit tests (and
pytestpasses). - [x] Is Flake 8 compliant (install
flake8-docstringsand runflake8 --docstring-convention=all).
Documentation
- [n/a] New features are documented, with examples if plot related.
- [n/a] New features have an entry in
doc/users/next_whats_new/(follow instructions in README.rst there). - [n/a] API changes documented in
doc/api/next_api_changes/(follow instructions in README.rst there). - [x] Documentation is sphinx and numpydoc compliant (the docs should build without error).
This needs a rebase to check that the docs build is clean.
I am a bit torn on this, we should avoid thrashing back and forth. I think for the cases where we have a simple keyword it is better to use that add_gridspec, but I am not sure that (..., **gridspec_kw={...}) is actually clearer or easier to understand than obj.add_gridspec(...)
I don't feel like advocating for it that much and there are only two files, so I've reverted to add_gridspec where it doesn't have a keyword argument