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

Appearance settings

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

Copy link
Copy link
Closed
@amichaut

Description

@amichaut
Issue body actions

Bug report

Bug summary

I want to make rotate a 3D plot using the view_init method. If the azim argument is used it makes a smooth rotation around the z-axis. However, if the elev 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

import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import axes3d
from pylab import *

elevation=345 #or -15
angle=None

fig = 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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.