title: Gnuplot auto-size?
body: <p>I'm able to create a graph with gnuplot. I use this template to do it :</p>
  
  <pre><code>f(w) = (strlen(w) &gt; 10 ? word(w, 1) . "\n" . word(w, 2) : w)
  
  set title "TITLE"
  set terminal png truecolor size 960, 720 background rgb "#eff1f0"
  set output "/var/www/html/CLUSTER_NAME.png"
  set bmargin at screen 0.1
  set key center top
  set grid
  set style data histograms
  set style fill solid 1.00 border -1
  set boxwidth 0.7 relative
  set yrange [*:*]
  set format y "%g%%"
  set datafile separator ","
  plot 'test1.txt' using 2:xtic(f(stringcolumn(1))) title " CPU consumption (%) ", \
  '' using 3 title " RAM consumption (%)", \
  '' using 0:($2+1):(sprintf("%g%%",$2)) with labels notitle, \
  '' using 0:($3+1):(sprintf("     %g%%",$3)) with labels notitle
  
  </code></pre>
  
  <p>TITLE and CLUSTER_NAME are just names that allow me to make a sed via another script to replace these names with the right ones.</p>
  
  <p>At the beginning, I was using this to manage the size of my graph: </p>
  
  <pre><code>set yrange [0:]
  </code></pre>
  
  <p>But now, I use this to automatically manage the size :</p>
  
  <pre><code>set yrange[*:*]
  </code></pre>
  
  <p>The problem is : for some graph, either some percentages overlap, or the percentages go out of the frame, or the space between the bar and the percentage is too large...</p>
  
  <p><a href="http://image.noelshack.com/fichiers/2019/18/5/1556891635-cluster-cpy-01.png" rel="nofollow noreferrer">http://image.noelshack.com/fichiers/2019/18/5/1556891635-cluster-cpy-01.png</a>
  <a href="http://image.noelshack.com/fichiers/2019/18/5/1556891641-cluster-mo1-erp-bb-01.png" rel="nofollow noreferrer">http://image.noelshack.com/fichiers/2019/18/5/1556891641-cluster-mo1-erp-bb-01.png</a></p>
  
  <p>Isn't there an option that allows me to manage this automatically, so that the percentages don't overlap anymore etc... ?</p>
  
  <p>I think we have to play with canvas size management,  but I don't know how... Can you help me?</p>