我的值差异非常小,例如...0.000001。我想以对数尺度可视化它们。我想知道如何在 matplotlib 中做到这一点。
多谢
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.axis http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.axis
只需添加关键字参数log=True
或者,举个例子:
from matplotlib import pyplot
import math
pyplot.plot([x for x in range(100)],[math.exp(y) for y in range(100)] )
pyplot.xlabel('arbitrary')
pyplot.ylabel('arbitrary')
pyplot.title('arbitrary')
#pyplot.xscale('log')
pyplot.yscale('log')
pyplot.show()
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)