The Wayback Machine - https://web.archive.org/web/20211103004700/https://github.com/matplotlib/matplotlib/issues/21336
Skip to content
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

[Bug]: axes_grid parasite_axes ticks and ticklabels not taken into account by tight/constrained layout #21336

Open
anntzer opened this issue Oct 11, 2021 · 3 comments

Comments

Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 11, 2021

Bug summary

axes_grid parasite_axes ticks and ticklabels are not taken into account by tight/constrained layout.

Code for reproduction

from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot

plt.figure()  # or tight_layout=True or constrained_layout=True
h = host_subplot(111)
p = h.twinx()
p.plot([1e-10, 2e-10, 3e-10])

plt.show()

Actual outcome

without tight/constrained layout
ok

with tight/constrained layout
notok

Expected outcome

The parasite ticks/labels/offsettext are included in the tight/constrained layouting.

Operating system

linux

Matplotlib Version

3.5.0.dev2254+g97ba9d41ef

Matplotlib Backend

qt5agg

Python version

39

Jupyter version

no

Other libraries

No response

Installation

No response

Conda channel

No response

@jklymak
Copy link
Member

@jklymak jklymak commented Oct 11, 2021

I think those two tags are incompatible, right?😀.

@anntzer
Copy link
Contributor Author

@anntzer anntzer commented Oct 11, 2021

I think host_axes could be compatible with the standard layout managers? (I agree there are other parts of axes_grid which will never be.)

@jklymak
Copy link
Member

@jklymak jklymak commented Oct 12, 2021

Probably possible, but I still have the long-term goal of bringing most of this into the main body of the library.

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