Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: vertical_axis not respected when rotating plots interactively #28040

Closed
Milestone
@Illviljan

Description

@Illviljan

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

Inital view:
image

After a small rotation on thebottom right plot:
image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp