import xlrdimport matplotlib.pyplot as plt bok = xlrd.open_workbook(r'test.xls') sht = bok.sheets()[0] row1 = sht.row_values(0) X=sht.col_values(0 , s ...
import xlrd
import matplotlib.pyplot as plt
bok = xlrd.open_workbook(r'test.xls')
sht = bok.sheets()[0]
row1 = sht.row_values(0)
X=sht.col_values(0 , start_rowx=0, end_rowx=None)
Y=sht.col_values(1 , start_rowx=0, end_rowx=None)
plt.plot(X,Y,"ro")
EXCEL數據示例:
繪製圖形示例: