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

Axes3D.view_init elevation issue between 270 and 360 degrees #10241

Closed
Milestone
@amichaut

Description

@amichaut

Bug report

Bug summary

I want to make rotate a 3D plot using theview_initmethod. If theazim argument is used it makes a smooth rotation around the z-axis. However, if theelev argument is used the plot is flipped after the angle 270 degrees. This problem seems to come from the fact that the range [0:-90] does not give the same output as the range [270:360] while it should. Here are two outputs that should be the same for -15 and 345, but there are not.

345
-15

Code for reproduction

importmatplotlib.pyplotaspltfrommatplotlibimportcmfrommpl_toolkits.mplot3dimportaxes3dfrompylabimport*elevation=345#or -15angle=Nonefig=plt.figure()ax=fig.add_subplot(111,projection='3d')X,Y,Z=axes3d.get_test_data(0.05)s=ax.plot_surface(X,Y,Z,cmap=cm.jet)ax.view_init(elev=elevation,azim=angle)plt.axis('off')

Matplotlib version

  • Operating system: Debian
  • Matplotlib version: 2.1
  • Matplotlib backend:TkAgg
  • Python version: 2.7

Installed from pip

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