更新时间:2023-10-08 16:08:52
很简单.绘制标签后,您可以简单地更改旋转:
It is very simple. After plotting the label, you can simply change the rotation:
from matplotlib import pyplot as plt
plt.ion()
plt.plot([1,2,3])
h = plt.ylabel('y')
h.set_rotation(0)
plt.draw()
或者,您可以将旋转作为参数传递,即
Alternatively, you can pass the rotation as an argument, i.e
plt.ylabel('y',rotation=0)