Skip to content

Also use _TransformedBoundsLocator to position twin subplots.#22805

Closed
anntzer wants to merge 1 commit intomatplotlib:mainfrom
anntzer:twinloc
Closed

Also use _TransformedBoundsLocator to position twin subplots.#22805
anntzer wants to merge 1 commit intomatplotlib:mainfrom
anntzer:twinloc

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Apr 8, 2022

i.e. position the twin "at the same position as the parent" instead of
trying to locate it as a subplot (which breaks if the parent is then
modified using make_axes_locatable).

Closes #5904 (despite #5904 (comment)).

PR Summary

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

  • New features are documented, with examples if plot related.
  • 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).

i.e. position the twin "at the same position as the parent" instead of
trying to locate it as a subplot (which breaks if the parent is then
modified using make_axes_locatable).
@anntzer anntzer added topic: geometry manager LayoutEngine, Constrained layout, Tight layout topic: axes labels Apr 8, 2022
@jklymak
Copy link
Copy Markdown
Member

jklymak commented Apr 8, 2022

Isn't this the same as #21413 ?

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Apr 8, 2022

Ah yes, sorry I missed it.

@anntzer anntzer closed this Apr 8, 2022
@anntzer anntzer deleted the twinloc branch April 8, 2022 17:29
@jklymak
Copy link
Copy Markdown
Member

jklymak commented Apr 8, 2022

Note that pr has a pretty big issue though with draw order.

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

Labels

topic: axes topic: geometry manager LayoutEngine, Constrained layout, Tight layout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matplotlib colorbar moves second x axis drawn with twiny

2 participants