How do I rotate the z-label so the text reads (bottom => top) rather than (top => bottom)?
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.set_zlabel('label text flipped', rotation=90)
ax.azim = 225
plt.show()
I want this to hold no matter what my ax.azim
setting is. This seems to be an old feature request on github but there isn't a work on it. Is there a workaround?
As a workaround, you could set the direction of the z-label manually by:
Please note that the direction of your z-label also depends on your viewpoint, e.g:
gives
Update: It is also possible, to adjust the z-label direction of a plot, which is already drawn (but not beforehand). This is the adjusted version to modify the labels: