2
我試圖與matplotlib的plotfile
功能繪製了一些數據,即如何在matplotlib中使用plotfile?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from matplotlib.pyplot import *
from numpy import *
x = arange(0,10,0.001)
y = sin(x)
savetxt("test.dat",column_stack((x,y)))
plotfile("test.dat",(0,))
show()
這給了我使用genfromtxt()
功能以下錯誤
ValueError: invalid literal for float(): 1.000000000000000021e-03 9.99999833333341681
可以完美兼容,所以我不要生成的數據看到 爲什麼會出現錯誤。感謝您的幫助。