一、 matplotlib绘图
import xlrd2 as rd
from matplotlib import pyplot as plt
wb=rd.open_workbook('data.xlsx')
sheet1=wb.sheets()[0]
x=sheet1.col_values(0)
y=sheet1.col_values(1)
plt.plot(x,y)
plt.show()
结果:
import xlrd2 as rd
from matplotlib import pyplot as plt
wb=rd.open_workbook('data.xlsx')
sheet1=wb.sheets()[0]
x=sheet1.col_values(0)
y=sheet1.col_values(1)
plt.plot(x,y)
plt.show()
结果: