mirror of
https://github.com/Estom/notes.git
synced 2026-02-07 12:35:20 +08:00
547 B
547 B
对数轴
这是使用semilogx为x轴分配对数刻度的示例。
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
dt = 0.01
t = np.arange(dt, 20.0, dt)
ax.semilogx(t, np.exp(-t / 5.0))
ax.grid()
plt.show()
