例:应用matplotlib绘制(0,0)至(6,100)直线
import matplotlib.pyplot as plt
import numpy as np
xpoints = np.array([0,6])
ypoints = np.array([0,100])
plt.plot(xpoint, ypoint)
plt.show()
plt.plot(x,y,格式符代码,**kwargs)
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
f = pd.read_csv("C:\\Users\\kk\\Desktop\\新建 XLSX 工作表.csv", encoding='gbk')
#导入csv文件
title = list(f.columns.values)
#获取列标签
content = list(f.loc[0])
#获取行内容
print(title)
print(content)
plt.plot(title, content)
#绘图
plt.show()