Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug summary
When settingax.view_init(vertical_axis="x")
the plot is initialized as intended but once rotating it a little the plot andax._vertical_axis
is reset to the default value.
Code for reproduction
x=np.array([0,1,2,4])y=np.array([5,10])z=np.array([100,150,200])X,Y,Z=np.meshgrid(*[x,y,z],indexing="ij")c=np.arange(0,X.size)plt.figure()forj, (a,e)inenumerate([(0,0), (-60,30)]):fori,vert_ainenumerate(["z","y","x"]):ax=plt.subplot(2,3,j*3+1+i,projection="3d")pc=ax.scatter(X,Y,Z,c=c)# ax.view_init(vertical_axis=vert_a)# ax.view_init(azim=0, elev=0, vertical_axis=vert_a)# ax.view_init(azim=-60, elev=30, vertical_axis=vert_a)ax.view_init(azim=a,elev=e,vertical_axis=vert_a)ax.set_title(f"azim={a}, elev={e}, vertical_axis='{vert_a}'")ax.set_xlabel("x")ax.set_ylabel("y")ax.set_zlabel("z")
Actual outcome
After a small rotation on thebottom right plot:
Expected outcome
ax._vertical_axis
should stay the same when rotating plots. This worked correctly in earlier matplotlib version.
Additional information
No response
Operating system
Windows 10
Matplotlib Version
3.8.3
Matplotlib Backend
Qt5Agg
Python version
3.12
Jupyter version
No response
Installation
conda