14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

70 SET-SHOW <strong>gnuplot</strong> 4.3 129<br />

70.57 Samples<br />

The sampling rate of functions, or for interpolating data, may be changed by the set samples command.<br />

Syntax:<br />

set samples {,}<br />

show samples<br />

By default, sampling is set to 100 points. A higher sampling rate will produce more accurate plots,<br />

but will take longer. This parameter has no effect on data file plotting unless one of the interpolation/approximation<br />

options is used. See plot smooth (p. 71) re 2D data and set cntrparam (p. 92)<br />

and set dgrid3d (p. 97) re 3D data.<br />

When a 2D graph is being done, only the value of is relevant.<br />

When a surface plot is being done without the removal of hidden lines, the value of samples specifies the<br />

number of samples that are to be evaluated for the isolines. Each iso-v line will have samples<br />

and each iso-u line will have samples. If you only specify , will<br />

be set to the same value as . See also set isosamples (p. 105).<br />

70.58 Size<br />

Syntax:<br />

set size {{no}square | ratio | noratio} {,}<br />

show size<br />

The and values are scale factors for the size of the plot, which includes the graph,<br />

labels, and margins.<br />

Important note:<br />

In earlier versions of <strong>gnuplot</strong>, some terminal types used the values from<br />

‘set size‘ to control also the size of the output canvas; others did not.<br />

In version 4.2 almost all terminals now follow the following convention:<br />

set term size , controls the size of the output file, or canvas.<br />

Please see individual terminal <strong>documentation</strong> for allowed values of the size parameters. By default, the<br />

plot will fill this canvas.<br />

set size , scales the plot itself relative to the size of the canvas. Scale values less than<br />

1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of<br />

the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems<br />

on some terminal types.<br />

ratio causes <strong>gnuplot</strong> to try to create a graph with an aspect ratio of (the ratio of the y-axis length<br />

to the x-axis length) within the portion of the plot specified by and .<br />

The meaning of a negative value for is different. If =-1, <strong>gnuplot</strong> tries to set the scales so that<br />

the unit has the same length on both the x and y axes (suitable for geographical data, for instance). If<br />

=-2, the unit on y has twice the length of the unit on x, and so on.<br />

The success of <strong>gnuplot</strong> in producing the requested aspect ratio depends on the terminal selected. The<br />

graph area will be the largest rectangle of aspect ratio that will fit into the specified portion of the<br />

output (leaving adequate margins, of course).<br />

square is a synonym for ratio 1.<br />

Both noratio and nosquare return the graph to the default aspect ratio of the terminal, but do not<br />

return or to their default values (1.0).<br />

ratio and square have no effect on 3D plots.<br />

Examples:<br />

To set the size so that the plot fills the available canvas:<br />

set size 1,1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!