Closed
Description
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.
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