Credits | Overview | Plotting Styles | Commands | Terminals |
---|
This documentation uses the term "canvas" to mean the full drawing area available for positioning the plot and associated elements like labels, titles, key, etc. NB: For information about the HTML5 canvas terminal see set term canvas.
set term <terminal_type> size <XX>, <YY> controls the size of the output file, or "canvas". By default, the plot will fill this canvas.
set size <XX>, <YY> scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems.
Example:
set size 0.5, 0.5 set term png size 600, 400 set output "figure.png" plot "data" with lines
These commands produce an output file "figure.png" that is 600 pixels wide and 400 pixels tall. The plot will fill the lower left quarter of this canvas.
Note: In early versions of gnuplot some terminal types used set size to control the size of the output canvas. This was deprecated in version 4.