title: GNUPLOT: How to set the paper auto-sized while keeping the aspect ratio correct?
body: <p>I am using C++ to stream Gnuplot scripts. But I find it is very annoying in handling aspect ratio and paper size. Does anyone has a good method to:</p>
  
  <p>(1) Keep the aspect ratio correct, length 1 is 1, 2 is 2 in plot. I found the aspect ratio is dependent on the paper size!!!</p>
  
  <p>(2) Zero margin paper, the paper size would be autoscaled. I found eps figure always has big margins.</p>
  
  <pre><code>set terminal postscript eps enhanced color font 'Helvetica,2000' size 640,480
  set output 'grid.eps'
  set size 1, 1
  set hidden3d
  unset key
  unset tics
  unset border
  set view 0,0,1,1
  set xrange [0:3]
  set yrange [0:6]
  set zrange [0:1]
  set title 'grid test'
  splot 'grid.dat' using 1:2:3 with lines lt 2 lc rgb '#100000'
  </code></pre>
  
  <p><code>grid.dat</code> file:</p>
  
  <pre><code>0 0 0
  1 0 0
  2 0 0
  3 0 0
  
  0 2 0
  1 2 0
  2 2 0
  3 2 0
  
  0 4 0
  1 4 0
  2 4 0
  3 4 0
  
  0 6 0
  1 6 0
  2 6 0
  3 6 0
  </code></pre>
  
  <p>By saying aspect ratio correct, I mean I want the plot to look like exactly a 2:1 rectangular grid, not like square or anything else. I don't want the figure to be stretched someway.</p>