Gnuplot - no space between the graph and the edge of the png image

How to create a .png image in gnuplot so as not to see spaces between the graph itself and the edges of the image. I use

 set terminal pngcairo size 800,600 enhanced 

I want exactly 800x600 images. And you want the entire 0X axis to correspond to the interval [0..800], and all 0Y to correspond to the interval [0..600].

+4
source share
1 answer

It looks like you want to set the fields to 0. Here is an example script:

 set terminal pngcairo size 800,600 enhanced set output 'output.png' set lmargin 0 set rmargin 0 set tmargin 0 set bmargin 0 #unset tics plot sin(x) # notitle 

Thus, the plot will accurately fill the canvas. You can enter help set margin in gnuplot for more information. (Uncomment the comments in my example if you want a slightly cleaner plot.)

+8
source

All Articles