title: Plotting data from two columns in a .txt file (Python)
body: <p>I'm new to Python on OSX and need to plot data from two columns within a .txt file. On windows I used the 'x[:,0]' function to denote columns though this seems to not work on Mac. I have tried the following:</p>
  
  <pre><code>f = open(os.path.expanduser("~/Desktop/a.txt.rtf"))
  
  lines=f.readlines()
  
  result=[]
  
  for x in lines:
      result.append(x.split(' ')[0])
  
  for y in lines:
      result.append(y.split(' ')[1]) 
  
  f.close()
  
  plt.plot(x,y)
  plt.show()
  </code></pre>
  
  <p>But it says that the list index is out of range, even though the test file just reads:</p>
  
  <pre><code>1  2
  3  4
  5  6
  7  8
  </code></pre>
  
  <p>How can that be? Please help!</p>
  
  <p>After solving this I need to know the Mac alternative to the "skip_header =" function (as the file I want to use has the data I need starting 25 rows down...)</p>
  
  <p>Thanks in advance, and sorry if these are easy queries but I just can't make it work :(</p>