最佳答案
几个小时以来我一直在试图抑制皮普洛特的科学记数法。在尝试了多种解决方案都没有成功之后,我希望得到一些帮助。
plt.plot(range(2003,2012,1),range(200300,201200,100))
# several solutions from other questions have not worked, including
# plt.ticklabel_format(style='sci', axis='x', scilimits=(-1000000,1000000))
# ax.get_xaxis().get_major_formatter().set_useOffset(False)
plt.show()
Is ticklabel_format broken? does not resolve the issue of actually removing the offset.
plt.plot(np.arange(1e6, 3 * 1e7, 1e6))
plt.ticklabel_format(useOffset=False)