CHAPTER 03 · 作品已接入
坐标轴标签
用 xlabel() / ylabel() 为图表补充语义信息。
import matplotlib.pyplot as plt
plt.plot([0, 2, 4, 6, 8, 10], [15, 28, 23, 52, 60, 76])
plt.xlabel('Time (s)', color='#5b9dff')
plt.ylabel('Amplitude', color='#5b9dff')
plt.show()
CHAPTER 03 · 作品已接入
用 xlabel() / ylabel() 为图表补充语义信息。
import matplotlib.pyplot as plt
plt.plot([0, 2, 4, 6, 8, 10], [15, 28, 23, 52, 60, 76])
plt.xlabel('Time (s)', color='#5b9dff')
plt.ylabel('Amplitude', color='#5b9dff')
plt.show()