title: (Gnuplot ) How to create a .png image with no spaces between graph and image edges?
body: <p>I'm currently trying to output an image in Gnuplot that only shows the plot, without tics, border, or margin. I'm using "splot", and the commands</p>
  
  <pre><code>set terminal pngcairo size 1024,768 enhanced
  set output 'output.png'
  unset colorbox
  set lmargin 0
  set rmargin 0
  set tmargin 0
  set bmargin 0
  unset tics
  set pm3d map
  set palette
  set zero 1E-40
  set cbrange[0:16]
  set xrange[-1.7999999105699706625216549582546577:-1.7999999105620294592711161385523155]
  set yrange[-2.941176470588235211202093999389572e-12:2.941176470588235211202093999389572e-12]
  splot "splot.dat" using 1:2:3 with pm3d notitle
  unset output
  </code></pre>
  
  <p>But the image I obtain is <a href="https://i.stack.imgur.com/7oJae.png" rel="nofollow noreferrer">image</a>. The margin is white so it gets blended with the background of this web page but if you save the image and view it, one can clearly see that the margin exists. I would really appreciate any help with this problem.</p>
  
  <p>Thanks.</p>