title: gnuplot: line 1: invalid command
body: <p>Hello All you Lovely People on stackoverflow,</p>
  
  <p>I am trying to plot data using gnuplot. I start by reading through a table and pulling out the data I want. I write this data to a .dat file. As of now, I'm just trying to plot it through a command line but will add the necessary code to plot it from the python script after it's working. </p>
  
  <p>My code which creates the .dat file-</p>
  
  <pre><code>#!/usr/bin/python
  
  file = open("test_m.rdb")
  table = open('table.dat', 'w+')
  
  trash = file.readline()
  
  trash = file.readline()
  
  data = file.readline()
  i = data.split()
  flux = i[2]
  observed = i[4]
  table.write(flux + " " + observed,)
  
  while 1:
      line = file.readline()
      i = line.split()
      try:
          flux = i[2]
          observed = i[4]
      except IndexError:
          break
      table.write("\n" + flux + " " + observed)
      table.close()
  </code></pre>
  
  <p>The command I'm attempting to use in cygwin and the error-</p>
  
  <pre><code>gnuplot plot table.dat
  
  0.058 2
  ^
  "table.dat", line 1: invalid command
  </code></pre>
  
  <p>Thank you in advance. I appreciate any suggestions you can offer.</p>