如所解释的,
here
你可以设置一个
ScalarFormatter
省略科学符号。
.set_scientific(False)
还需要压制大数字的科学符号。
你可能需要
axs.yaxis.set_major_formatter(ticker.FuncFormatter(lambda y, _: '{:g}'.format(y)))
如果你正在处理负面权力。
from matplotlib import pyplot as plt
from matplotlib.ticker import ScalarFormatter
fig = plt.figure(figsize=(30, 15))
axs = fig.add_subplot(1, 1, 1)
axs.plot()
axs.set_ylim(100000, 100000000)
axs.set_yscale('log')
formatter = ScalarFormatter()
formatter.set_scientific(False)
axs.yaxis.set_major_formatter(formatter)
plt.show()