Initially I was simply using MatPlotLib to graph the points after I read them like this:
with open("data1.txt") as f:
samples = f.read()
samples = samples.split('\n')
x = [row.split(' ')[0] for row in samples]
y = [row.split(' ')[1] for row in samples]
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.plot(x,y, 'ro')
However, I now realize I need to store all that information in an array of some kind to be used later. I'm new to python, so I'm wondering either how I could access these points individually if my samples variable already has what I want, or instead create a new array or list to store all my x and y values easily.
EDIT:
This is how my txt file looks:
0.1394 0.8231
1.2149 1.8136
1.3823 0.8263
1.3726 0.8158
1.3694 0.8158
1.3855 0.8123
1.3919 0.8053
1.3694 0.8123
1.3661 0.8123
1.3597 0.7982
1.3565 0.6061
1.3468 0.7126
1.3823 0.7494