Matplotlib绘制折线图
程序员文章站
2022-06-19 11:00:49
...
import matplotlib
from matplotlib import pyplot as plt
plt.figure(figsize=(12,6))
plt.plot(womenhw.Year,womenhw.avgh,color="b",label="women",linewidth=1,marker="o")
plt.plot(menhw.Year,menhw.avgh,color="r",label="men",linewidth=1,marker="o")
plt.title("Average Height")
plt.legend()
下一篇: 闭包是什么?