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 117<br />

70.44 Offsets<br />

Offsets provide a mechanism to put a boundary around the data inside of an autoscaled graph.<br />

Syntax:<br />

set offsets , , , <br />

unset offsets<br />

show offsets<br />

Each offset may be a constant or an expression. Each defaults to 0. Left and right offsets are given in<br />

units of the x axis, top and bottom offsets in units of the y axis. A positive offset expands the graph in<br />

the specified direction, e.g., a positive bottom offset makes ymin more negative. Negative offsets, while<br />

permitted, can have unexpected interactions with autoscaling and clipping.<br />

Offsets are ignored in splots.<br />

Example:<br />

set offsets 0, 0, 2, 2<br />

plot sin(x)<br />

This graph of sin(x) will have a y range [-3:3] because the function will be autoscaled to [-1:1] and the<br />

vertical offsets are each two.<br />

70.45 Origin<br />

The set origin command is used to specify the origin of a plotting surface (i.e., the graph and its<br />

margins) on the screen. The coordinates are given in the screen coordinate system (see coordinates<br />

(p. 24) for information about this system).<br />

Syntax:<br />

set origin ,<br />

70.46 Output<br />

By default, screens are displayed to the standard output.<br />

display to the specified file or device.<br />

Syntax:<br />

set output {""}<br />

show output<br />

The set output command redirects the<br />

The filename must be enclosed in quotes. If the filename is omitted, any output file opened by a<br />

previous invocation of set output will be closed and new output will be sent to STDOUT. (If you give<br />

the command set output "STDOUT", your output may be sent to a file named "STDOUT"! ["May<br />

be", not "will be", because some terminals, like x11 or wxt, ignore set output.])<br />

MSDOS users should note that the \ character has special significance in double-quoted strings, so<br />

single-quotes should be used for filenames in different directories.<br />

When both set terminal and set output are used together, it is safest to give set terminal first,<br />

because some terminals set a flag which is needed in some operating systems. This would be the case,<br />

for example, if the operating system needs to know whether or not a file is to be formatted in order to<br />

open it properly.<br />

On machines with popen functions (Unix), output can be piped through a shell command if the first<br />

non-whitespace character of the filename is ’|’. For instance,<br />

set output "|lpr -Plaser filename"<br />

set output "|lp -dlaser filename"<br />

On MSDOS machines, set output "PRN" will direct the output to the default printer. On VMS,<br />

output can be sent directly to any spooled device. It is also possible to send the output to DECnet<br />

transparent tasks, which allows some flexibility.

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

Saved successfully!

Ooh no, something went wrong!