Changing the plot size

The size of the graph is specified as a size option to the set term command. The exact interpretation of this option may vary between terminals, and has changed in recent versions of gnuplot. We'll give an example of its most recent usage in gnuplot 4.4. The following figure illustrates the use of the size option in gnuplot:

Changing the plot size

How to do it…

The figure consists of three separate files created by gnuplot using the following recipe:

unset key
set term postscript size 6,2
set out 'p1.ps'
plot sin(x)
set term postscript size 5,5
set out 'p2.ps'
plot sin(x)
set term postscript size 3,6
set out 'p3.ps'
plot sin(x)

How it works…

First ...

Get gnuplot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.