编程语言
首页 > 编程语言> > PythonX,Y散点图示范

PythonX,Y散点图示范

作者:互联网

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()

 

标签:0.8,PythonX,plt,散点图,示范,result,test,import,rawdata
来源: https://www.cnblogs.com/suchcools/p/15120559.html