I would like to get the y-axis inverted to share a common original point with x-axis,the x-axis can be inverted, but the y-axis can be set like x-axis,so could any one give me some suggestions?the wanted result is shown in the picture.
import mpl_toolkits.mplot3d
ax = plt.gca(projection = '3d')
ax.set_title('3d_image_show')
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
ax.view_init(elev=20, azim=45)
ax.invert_xaxis()
ax.invert_yaxis()
Change azim to -135
(comes from 45-180
, 45
is from your code), and no need to invert the axes.
import mpl_toolkits.mplot3d
fig = plt.figure()
ax = plt.gca(projection = '3d')
ax.set_title('3d_image_show')
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
ax.view_init(elev=20, azim=-135)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.