title: Gnuplot with epslatex: How to nagate error while generating output
body: <p>I have the following script which generates a single .eps file as the final output</p>
  
  <pre><code>set terminal epslatex color size 4.5in,4.5in standalone
  set output 'profile.tex'
  set xlabel "Time"
  set ylabel "$d_g$"
  set xrange [:500000]
  set yrange [:40]
  set size ratio 1.05
  set key right bottom
  pl 'file.txt' u 2:(17.75-$4) w l
  unset out
  set out
  system('latex profile.tex &amp;&amp; dvips profile.dvi &amp;&amp; ps2pdf profile.ps')
  system('mv profile.ps CON_GBD.eps')
  unset terminal
  set out
  </code></pre>
  
  <p>While using the above script I get the following error</p>
  
  <pre><code>! Missing $ inserted.
  &lt;inserted text&gt; 
                  $
  l.175     \gplfronttext
  
  ? 
  </code></pre>
  
  <p>Can anyone point out as to why this error comes up?</p>