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.
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
Activity
ivanov commented on 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 commented on Nov 18, 2012
I agree, it is indeed a misleading behavior, nice report.
rozsat commented on Nov 28, 2012
+1
tacaswell commented on Aug 18, 2014
Closing this as we have #1502 open.