1 year ago
#296580
lqope54
How can I reverse the axes in 3d graph?
Just starting with 3D plotting in Matplotlib. In the image below, how can I reverse the x and y axes and have a common origin of 0 for both the axes as written in red ink ? I could not find something specific to this case. All help would be appreciated. I tried the following code but the data changes when I change both x and y axes together.
ax.set_xlim3d(0, 500)
ax.set_ylim3d(0, 5000)
ax.set_zlim3d(0, 0.0035)
ax.set_xlabel('Frequency [Hz]', labelpad=10)
ax.set_ylabel('Wheel Speed [RPM]', labelpad=10)
ax.set_zlabel('Amplitude Spectrum [V]', labelpad=10)
ax.invert_xaxis()
ax.invert_yaxis()
fig = plt.figure(figsize=(4.,35))
plt.rcParams["figure.dpi"] = 350
plt.show()
python
matplotlib
matplotlib-3d
0 Answers
Your Answer