matplotlib icon indicating copy to clipboard operation
matplotlib copied to clipboard

Avoid gridspec in more examples

Open QuLogic opened this issue 3 years ago • 1 comments

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 pytest passes).
  • [x] Is Flake 8 compliant (install flake8-docstrings and run flake8 --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).

QuLogic avatar Jul 28 '22 08:07 QuLogic

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(...)

tacaswell avatar Aug 10 '22 19:08 tacaswell

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

QuLogic avatar Aug 10 '22 22:08 QuLogic