hig*_*n16 4 python matplotlib
我正在使用matplotlib绘制一系列数据并获得如下结果
但我希望有一个非线性轴如下.
我怎样才能制作那种情节?提前致谢.
Lau*_*nol 7
您可以通过写入将y轴设置为logaritmic plt.yscale('log')
plt.yscale('log')
完整的例子:
import matplotlib.pyplot as plt example = [pow(2,i) for i in range(10)] plt.plot(example) plt.yscale('log') plt.show()
归档时间:
9 年,3 月 前
查看次数:
1967 次
最近记录: