You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
set_{x,y,z}bound 3d limits are not persistent upon interactive rotation #18112
Is it reasonable that *bounds and *lim behave differently concerning auto-scaling? But even if so, it may be hard to change, because I expect that would break a lot of user code.
Is there a reason that 3D rotation tries to auto-scale?
It's not the mouse move that triggers it, it's the draw. If you insert fig.canvas.draw() before plt.show(), the limits are [0, 1]. I don't know why this change during draw is not reflected in the plot.
I think this may be because of the new lazy autoscaling. Nothing in mplot3d sets the new ax._stale_viewlim_x, so _unstale_viewLim rescales.
This is a regression from 3.1.2; I will test some newer versions, but if it's lazy autoscaling, then it's a 3.3 3.2 regression. I think I've written most of a fix.
I don't know why this change during draw is not reflected in the plot.
And this is because Axes3D.draw first calculates the world projection, then calls super().draw(), and Axes.draw calls self._unstale_viewLim. Putting that at the beginning of Axes3D.draw makes things stabler. This is similar to #17422 for PolarAxes.
Activity
timhoffm commentedon Jul 29, 2020
The reason is the following
set_x/y/zlim()deactivate autoscaling (auto=False).set_x/y/zbound()leave the autoscaling unchanged (callingset_xlim(auto=None)).This can be verified via
fixing the issue.
Questions:
*boundsand*limbehave differently concerning auto-scaling? But even if so, it may be hard to change, because I expect that would break a lot of user code.QuLogic commentedon Jul 30, 2020
It's not the mouse move that triggers it, it's the draw. If you insert
fig.canvas.draw()beforeplt.show(), the limits are [0, 1]. I don't know why this change during draw is not reflected in the plot.I think this may be because of the new lazy autoscaling. Nothing in mplot3d sets the new
ax._stale_viewlim_x, so_unstale_viewLimrescales.QuLogic commentedon Jul 30, 2020
This is a regression from 3.1.2; I will test some newer versions, but if it's lazy autoscaling, then it's a
3.33.2 regression. I think I've written most of a fix.Implement lazy autoscaling in mplot3d.
QuLogic commentedon Jul 31, 2020
And this is because
Axes3D.drawfirst calculates the world projection, then callssuper().draw(), andAxes.drawcallsself._unstale_viewLim. Putting that at the beginning ofAxes3D.drawmakes things stabler. This is similar to #17422 forPolarAxes.Implement lazy autoscaling in mplot3d.
Implement lazy autoscaling in mplot3d.
Implement lazy autoscaling in mplot3d.