set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>} show size
The 4#4xscale5#5 and 4#4yscale5#5 values are scale factors for the size of the plot, which includes the graph, labels, and margins.
Important note:
In earlier versions of gnuplot, some terminal types used the values from `set size` to control also the size of the output canvas; others did not. Almost all terminals now follow the following convention:
set term 4#4terminal_type5#5 size 4#4XX5#5, 4#4YY5#5 controls the size of the output file, or canvas. Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas.
set size 4#4XX5#5, 4#4YY5#5 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 on some terminal types.
ratio causes gnuplot to try to create a graph with an aspect ratio of 4#4r5#5 (the ratio of the y-axis length to the x-axis length) within the portion of the plot specified by 4#4xscale5#5 and 4#4yscale5#5.
The meaning of a negative value for 4#4r5#5 is different. If 4#4r5#5=-1, gnuplot tries to set the scales so that the unit has the same length on both the x and y axes. This is the 2D equivalent to the 3D command set view equal xy. If 4#4r5#5=-2, the unit on y has twice the length of the unit on x, and so on.
The success of gnuplot in producing the requested aspect ratio depends on the terminal selected. The graph area will be the largest rectangle of aspect ratio 4#4r5#5 that will fit into the specified portion of the output (leaving adequate margins, of course).
set size square is a synonym for set size ratio 1.
Both noratio and nosquare return the graph to the default aspect ratio of the terminal, but do not return 4#4xscale5#5 or 4#4yscale5#5 to their default values (1.0).
ratio and square have no effect on 3D plots, but do affect 3D projections created using set view map. See also set view equal (p. ), which forces the x and y axes of a 3D onto the same scale.
Examples:
To set the size so that the plot fills the available canvas:
set size 1,1
To make the graph half size and square use:
set size square 0.5,0.5
To make the graph twice as high as wide use:
set size ratio 2