Skip to content

Adjust parent axes limits when clearing floating axes. - #25444

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
anntzer:facl
Mar 15, 2023
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
anntzer:facl

Conversation

@anntzer

@anntzer anntzer commented Mar 13, 2023 •

Copy link
Copy Markdown
Contributor

Without this patch, calling clear() in a FloatingAxes will reset the limits of the (invisible, parent, rectilinear) axes to (0, 1), (0, 1), instead of the values computed by adjust_axes_lim. For example, try adding a call to ax1.clear() in demo_floating_axes immediately after the call to setup_axes1; this previously resulted in a blown up left axes.
test

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Without this patch, calling clear() in a FloatingAxes will reset the
limits of the (invisible, parent, rectilinear) axes to (0, 1), (0, 1),
instead of the values computed by adjust_axes_lim.  For example, try
adding a call to ax1.clear() in demo_floating_axes immediately after
the call to setup_axes1.
@timhoffm timhoffm added this to the v3.8.0 milestone Mar 15, 2023
@timhoffm
timhoffm merged commit 378172b into matplotlib:main Mar 15, 2023
@anntzer
anntzer deleted the facl branch March 15, 2023 22:10
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.

3 participants