我试图绘制一个简单的图形,但有一些非常奇怪的输出。当我尝试在字典中绘制值(字典中的键是Ip地址)时,我得到以下输出:
root@vm:~# python makeGraph.py
in here
still working
: cannot connect to X server localhost:10.0
有什么可以解释这个?
#!/usr/bin/python
import matplotlib.pyplot as plt
.....
for k,v in timeDifferences.iteritems():
print 'in here'
countArray = []
for x in range(0,len(v)):
countArray.append(x)
print 'still working'
plt.plot(countArray, timeDifferences[k])
print 'done'