title: gnuplot horizontal key
body: <p>I'm using gnuplot in the multiplot environment. I want to have only one key box (which is not a problem) that i want to put in "horizontal mode" under the plots.</p>
  
  <pre><code>Nice Plot1 | Nice Plot2
  
  Nice Plot3 | Nice Plot4
  
        the keybox
  </code></pre>
  
  <p>It seems that the total size of the keybox can't exceed the width of its corresponding plot (so here it's half the screen size). This is causing line returns in the keybox which i don't want.</p>
  
  <p>Is there anyway to get around it?</p>
  
  <p>Thanks.</p>
  
  <p>Edit: Script added. (the keybox is on 3 lines) </p>
  
  <pre><code>set terminal epslatex color
  set output 'Plot.tex'
  set multiplot
  set xrange [0:0.8]
  set key box
  set key reverse horizontal maxcols 10 samplen 0.5 spacing 1
  #set key font ",9"
  set key at screen 0.9,0.15
  set size 0.5,0.5
  set origin 0,0
  set lmargin 4
  set bmargin 3
  set rmargin 0
  set tmargin 0
  set xtics nomirror
  set ytics nomirror
  plot x with lines lt 1 lw 4 lc rgb "red" title 'Median',\
  x  with lines lw 4 lc rgb "blue" title '$ F,F^{-1}$',\
  x with lines lw 4 lc rgb "magenta" title '$ F,\Gamma^\mathcal{P}$',\
  x with lines lw 4 lc rgb "orange" title '$\Lambda_\text{MI}$',\
  x with lines lt 1 lw 4 lc rgb "green" title '$k$-NN'
  
  
  #
  # Plot n°2
  #
  set size 0.5,0.5
  set origin 0,0.5
  set xrange [0:0.8]
  set key off
  set title ''
  set lmargin 4
  set bmargin 3
  set rmargin 0
  set tmargin 0
  set xtics nomirror
  set ytics nomirror
  plot x  with lines lt 1 lw 4 lc rgb "red" title 'Median',\
  x  with lines lw 4 lc rgb "blue" title '$ F,F^{-1}$',\
  x  with lines lw 4 lc rgb "magenta" title '$ F,\Gamma^\mathcal{P}$',\
  x  with lines lw 4 lc rgb "orange" title '$\Lambda_\text{MI}$',\
  x with lines lt 1 lw 4 lc rgb "green" title 'KNN',\
  x with lines lt 1 lw 4 lc rgb "black" title 'Ground Truth'
  
  set size 0.5,0.5
  set origin 0.5,0
  set xrange [0:0.8]
  set key off
  set title ''
  set lmargin 4
  set bmargin 3
  set rmargin 0
  set tmargin 0
  set xtics nomirror
  set ytics nomirror
  plot x with lines lt 1 lw 4 lc rgb "red" title 'Median',\
  x with lines lw 4 lc rgb "blue" title '$ F,F^{-1}$',\
  x with lines lw 4 lc rgb "magenta" title '$ F,\Gamma^\mathcal{P}$',\
  x with lines lw 4 lc rgb "orange" title '$\Lambda_\text{MI}$',\
  x with lines lt 1 lw 4 lc rgb "green" title 'KNN',\
  x with lines lt 1 lw 4 lc rgb "black" title 'Ground Truth'
  
  
  set size 0.5,0.5
  set origin 0.5,0.5
  set xrange [0:0.8]
  set key off
  set title ''
  set lmargin 4
  set bmargin 3
  set rmargin 0
  set tmargin 0
  set xtics nomirror
  set ytics nomirror
  plot x  with lines lt 1 lw 4 lc rgb "red" title 'Median',\
  x  with lines lw 4 lc rgb "blue" title '$ F,F^{-1}$',\
  x with lines lw 4 lc rgb "magenta" title '$ F,\Gamma^\mathcal{P}$',\
  x with lines lw 4 lc rgb "orange" title '$\Lambda_\text{MI}$',\
  x with lines lt 1 lw 4 lc rgb "green" title 'KNN',\
  x with lines lt 1 lw 4 lc rgb "black" title 'Ground Truth'
  </code></pre>