title: how to create graph title and labels from log file?
body: <p>In my file system, there are some header and comments and also label for graph. graph labels are started by <code>@</code> 
      How can I call my title and x and y level from log file which is 
      mention by <code>@</code>?</p>
  
  <pre><code>@    title "RMSD"
  @    xaxis  label "Time (ns)"
  @    yaxis  label "RMSD (nm)"
  </code></pre>
  
  <p>The script is:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import csv
  import argparse
  
  parser = argparse.ArgumentParser()
  parser.add_argument("-n","--filename", help="filename on")
  args = parser.parse_args()
  # example data
  filename=(args.filename)
  
  x, y = [],[]
  with open(filename) as f:
      for line in f:
          cols = line.split()
  
          if line.split("#"):
             pass
  
          if line.split("@"):
             pass
          try:
  
             if len(cols) == 2:
                   x.append(float(cols[0]))
                   y.append(float(cols[1]))
  
           except ValueError:
             pass
  fig = plt.figure()
  ax1 = fig.add_subplot(111)
  ax1.set_title("Temperature")  
  ax1.set_xlabel("time in PS")  
  ax1.set_ylabel("temp in K")
  ax1.plot (x,y, c='r', label='the data')
  leg = ax1.legend ()
  plt.savefig('data.png', dpi=500)  
  </code></pre>
  
  <p>the file formate is:</p>
  
  <pre><code># This file was created Wed May 25 12:05:43 2016
  # Created by:
  #                    :-) GROMACS - gmx rms, VERSION 5.1.2 (-:
  # 
  # Executable:   /usr/local/bin/gmx
  # Data prefix:  /usr/local
  # Command line:
  #   gmx rms -s md_0_1.tpr -f md_0_1_noPBC.xtc -o rmsd.xvg -tu ns
  # gmx rms is part of G R O M A C S:
  #
  # Great Red Oystrich Makes All Chemists Sane
  #
  @    title "RMSD"
  @    xaxis  label "Time (ns)"
  @    yaxis  label "RMSD (nm)"
  @TYPE xy
  @ subtitle "Backbone after lsq fit to Backbone"
      0.0000000    0.0005027
      0.0100000    0.0691386
  </code></pre>