Closed
Description
Bug report
Bug summary
mpl_toolkits.mplot3d.axes3d.Axes3D.view_init
provides a means to set the elevation and the azimuth, but the z-axis is always aligned with the vertical camera axis.
A third angle would be required to permit any view.
The issue was reported on stackoverflow 3.5 years ago.
Code for reproduction
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = Axes3D(fig)
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
plt.show()
Actual outcome
Now, however hard you try to rotate the plot interactively or what angles you set in ax.view_init()
, you will never be able to get the z-axis in a horizontalish position that is required to produce the plot below:
Expected outcome
By rotating interactively or via ax.view_init()
one should be able to obtain this view below. Unfortunately, this is not possible.
Matplotlib version
- Operating system: Ubuntu 16.04
- Matplotlib version: 3.1.0, py37h5429711_0
- Matplotlib backend: Qt5Agg
- Python version: 3.7.3 (conda)
Gabriel-p, GProulx, BorisLestsov, lubosz, dennisritter and 16 more