|||
refer to: https://matplotlib.org/stable/gallery/scales/log_test.html#sphx-glr-gallery-scales-log-test-py
This is an example of assigning a log-scale for the x-axis usingsemilogx
.
This is an example of assigning a log-scale for the x-axis usingsemilogx
.
import matplotlib.pyplot as pltimport numpy as npfig, ax = plt.subplots()dt = 0.01t = np.arange(dt, 20.0, dt)ax.semilogx(t, np.exp(-t / 5.0))ax.grid()plt.show()
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-10-19 23:28
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社