Skip to content

Do not pass width_ratios or height_ratios to inner layouts in subplot_mosaic #24188

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

Closed
wants to merge 5 commits into from

Conversation

joshbarrass
Copy link
Contributor

@joshbarrass joshbarrass commented Oct 16, 2022

PR Summary

Fixes #24099

Constructs a new gridspec_kw dictionary with the "width_ratios" and "height_ratios" removed, which is passed to the inner layouts instead of the original. This prevents an error from occurring when one of the inner layouts is not compatible with one of the specified ratios.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • 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).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@joshbarrass joshbarrass marked this pull request as draft October 16, 2022 14:47
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@joshbarrass joshbarrass marked this pull request as ready for review October 16, 2022 15:05
@joshbarrass
Copy link
Contributor Author

This PR was on the main branch of my fork -- resubmitting with this adjusted for clarity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Error using width_ratios with nested mosaic in subplot_mosaic()
2 participants