注意 前往結尾 以下載完整的範例程式碼。 對數軸# 這是一個使用 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() 由 Sphinx-Gallery 產生的圖庫