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

Panning and zooming does not work on axes created with twinx (and twiny) #1501

Closed
TPeter85 opened this issue Nov 15, 2012 · 4 comments
Closed

Comments

@TPeter85
Copy link

See: http://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html

If a plot is created like in the example above (using host_subplot for the host axes and twinx for the twin axes), panning or zooming does not work like in the case of the main axes. The twin axes seem to be fixed, i.e. their axis limits are not changed upon zooming or panning. This issue does not appear on the x-axis, only on y-axis (using twinx). This causes problems with interactive plots when zooming or panning is intented to show a part of the plotted lines.

During vertical panning only the plots of the host axes are panned but the twin ones do not react. If panned in the horizontal direction everything works fine.

If zoomed in on an area where only the plots on the host axes should be seen both twin axes are visible. Actually the twin axes are zoomed in but only on the x-axis as if the zoom would be used on their x-axis only.

The problem seems to appear only with mpl_toolkits.axes_grid1; pyplot.figure and pylab.figure work fine. I have tried both matplotlib 1.1 and 1.2. Both versions have this problem. I am using Python 2.7.2 on a Windows 7 64 bit machine.

@ivanov
Copy link
Member

ivanov commented Nov 15, 2012

thanks for the report, @TPeter85 - I'm confirming this bug on master using QT under Debian sid.

My reaction (outside of the fact that the behavior of axes_grid1 should be consistent with using plt.figure), is that sometimes this will be the behavior one wants, so I'll open another ticket for making that happen

@jozsag
Copy link

jozsag commented Nov 18, 2012

I agree, it is indeed a misleading behavior, nice report.

@rozsat
Copy link

rozsat commented Nov 28, 2012

+1

@tacaswell
Copy link
Member

Closing this as we have #1502 open.

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

No branches or pull requests

5 participants