我正在尝试使用bokeh库绘制时间线图
import matplotlib.pyplot as plt
import csv
with open('syscall.csv','r') as csvfile :
rows = list(csv.reader(csvfile, delimiter=','))[1:]
#rows.sort(key = lambda x: int(x[7]))
for row in rows:
print(row[6])
alfa=0.8
renk = 'g'
start, end, data = int(row[6]), int(row[14]), int(row[5])
x = [start, end]
y = [data, data]
plt.plot(x, y, label=row[0], marker='o', color = renk)
plt.xlabel('time(milliseconds)')
plt.ylabel('Amount of Data(bytes)')
plt.title('VFS and EXT4 layer READ/WRITE graph')
plt.legend(['VR = Red, ER=black, VW=blue, EW=green, vr=%d, er=%d, vw=%d,ew=%d'%(vrc,erc,vwc,ewc)],loc='lower left')
plt.grid(True)
plt.savefig('test.png')
plt.show()
我试图有效地使用博克的时间线图来可视化我的数据。在这个问题上,任何人都可以帮助我,或者任何建议都是欢迎的
亲切问候,, 谢谢
要使用bokeh图而不是matplotlib,您必须组织数据。我不能帮你,因为我没有你的档案。下面是一个原型,可以将一些数据点绘制成圆圈,欢迎您使用。如果这不是你想要的,请查看bokehgallery,因为这里有一些很好的例子
相关问题 更多 >
编程相关推荐