title: Label-Style in Gnuplot
body: <p>I use a Perl-script to make several graphs through piping a heredoc to Gnuplot (version 4.6 patchlevel 3). I have some problems to define labels in the desired manner. I want to:</p>
  
  <ul>
  <li>include variables in the label with the definition of the format (<code>sprintf</code>)</li>
  <li>use different labels for different plots</li>
  <li>show the labels in a box and show them in front</li>
  </ul>
  
  <p>I don't know how to define the <a href="http://gnuplot.sourceforge.net/docs_4.2/node184.html" rel="nofollow noreferrer">format specifiers</a> and I also had a look at the <a href="http://lavica.fesb.hr/cgi-bin/info2html?(gnuplot)label" rel="nofollow noreferrer">label docu1</a> [link isn't interpreted correctly] <a href="http://www.manpagez.com/info/gnuplot/gnuplot-4.4.3/gnuplot_259.php" rel="nofollow noreferrer">label docu2</a>. <a href="https://stackoverflow.com/questions/15362440/boxed-label-with-background-color/15367793#15367793">This post</a> shows a complicated way how to define the box and has to be set for every label.</p>
  
  <p>Sorry for posting not just one exact question, but they are all concerning the labeling style.</p>
  
  <p>My Gnuplot tests so far:</p>
  
  <pre><code>set style line 1 lt 1 lw 1 lc rgb "#FF4500"
  set label 1 'Var1 = sprintf("%5.3f",$Var1)' at graph 0.8, graph 0.95 front font 'Times-Roman,10'
  plot "file.dat" u 1:2 ls 1
  </code></pre>
  
  <p>My problems:</p>
  
  <ul>
  <li>The sprintf isn't interpreted in the output.</li>
  <li>I can't use the different labels like I use the different <code>ls</code> (linestyle).</li>
  <li>The boxing frame of the label has to be defined for every single label in a complicated manner.</li>
  </ul>
  
  <p>Thx in advance!</p>