My csv file looks
0.0 1
0.1 2
0.2 3
0.3 4
0.5 7
1.0 9
0.0 6
0.1 10
0.2 11
0.3 12
0.5 13
1.0 14
...
and I want to draw the first column in x axis, second column as y axis. So my code is
import matplotlib.pyplot as plt
from numpy import genfromtxt
data=genfromtxt("test",names=['x','y'])
ax=plt.subplot(111)
ax.plot(data['x'],data['y'])
plt.show()
But this connect the end point of graph, showing straight line,

(source: tistory.com)
What I want is this graph.

(source: tistory.com)
Then how do I read data file or are there any options in matplotlib disconnecting the line?
print data['x']andprint data['y'], it shows[ 0. 0.1 0.2 0.3 0.5 1. 0. 0.1 0.2 0.3 0.5 1. ]and[ 1. 2. 3. 4. 7. 9. 6. 10. 11. 12. 13. 14.]type(data['x'])?repr()of alist. Are you sure this is the output? Are you parsing the input values as floats?