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
inset_locator.mark_inset() misplaces box connectors #17711
Comments
I don't know if you need some feature of the axes_grid1 implementation, but the following seems to work fine: import matplotlib.pyplot as plt
fig, (inset, full) = plt.subplots(ncols=2)
full.plot([-1, 0], [-1, 0])
inset.set_xlim(-0.6, -0.4)
inset.set_ylim(-0.6, -0.4)
full.indicate_inset_zoom(inset)
plt.show() |
Yes, I understand the bug, but I think it's rather tricky to fix unless we introduce a full loop in Figure.draw where we go through all axes and autoscale them all (I guess perhaps at the same time as running the locators to position them...) before actually drawing them... |
I'd see if the OP really needs this to work in |
Thanks for the fast reply! I did discover that calling The reason I did not use
If you would consider |
@joreiff, I think the main library' version is probably stable. We've not received too many complaints about it, which either means it works fine, or no one is using it 😉 |
@jklymak In this case, I will be happy using the new API in the future. If fixing this bug is tricky and |
No, it should definitely stay open. I doubt axes_grid1 will ever be completely deprecated, and someone may want to fix this. |
Bug report
Bug summary
inset_locator.mark_inset()
sometimes misplaces the box connector lines if x/y limits on the parentAxes
have not been explicitly set. Updating the plot (e.g. by saving the figure) seems to fix it.Code for reproduction
Actual outcome
Expected outcome
This issue was not present in version 3.0.2.
Matplotlib version
print(matplotlib.get_backend())
):Qt5Agg
andagg
Installed via pip on Debian and both pip and dnf on Fedora.
The text was updated successfully, but these errors were encountered: