折线图

55.1 折线图

plot 画线,show 显示。

简单折线

import matplotlib.pyplot as plt
x = [1, 2, 3, 4]
y = [1, 4, 9, 16]
plt.plot(x, y)
plt.title('平方增长')
plt.show()