import matplotlib.pyplot as plt import pandas as pd import numpy as np rawdata = pd.read_excel("./data/test_result.xlsx") print(rawdata) test=rawdata['test'] result=rawdata['result'] y=rawdata['index'] #y轴高度 plt.ylim((0, 0.8)) #y轴精度 plt.yticks(np.arange(0,0.8,0.05)) #Z轴空间凸显 plt.scatter(y,test,marker='.',zorder=3) plt.scatter(y,result,marker='.') plt.show()