Reader small image

You're reading from  gnuplot Cookbook

Product typeBook
Published inFeb 2012
PublisherPackt
ISBN-139781849517249
Edition1st Edition
Tools
Right arrow
Author (1)
Lee Phillips
Lee Phillips
author image
Lee Phillips

Lee Phillips grew up on the 17th floor of a public housing project on the Lower East Side of Manhattan. He attended Stuyvesant High School and Hampshire College, where he studied Physics, Mathematics, and Music. He received a Ph.D. in 1987 from Dartmouth in theoretical and computational physics for research in fluid dynamics. After completing post-doctoral work in plasma physics, Dr. Phillips was hired by the Naval Research Laboratory in Washington, DC, where he worked on various problems, including the NIKE laser fusion project. Dr. Phillips is now the Chief Scientist of the Alogus Research Corporation, which conducts research in the physical sciences and provides technology assessment for investors.
Read more about Lee Phillips

Right arrow

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:

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 we turn off the legend, which gets in the way of the plots in this example. The set term commands each have a single size option, which sets the horizontal and vertical extents of the graphs in inches. Each plot is saved to a separate file with a set out command; the files were assembled in a graphics program into the figure. In general, especially...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
gnuplot Cookbook
Published in: Feb 2012Publisher: PacktISBN-13: 9781849517249

Author (1)

author image
Lee Phillips

Lee Phillips grew up on the 17th floor of a public housing project on the Lower East Side of Manhattan. He attended Stuyvesant High School and Hampshire College, where he studied Physics, Mathematics, and Music. He received a Ph.D. in 1987 from Dartmouth in theoretical and computational physics for research in fluid dynamics. After completing post-doctoral work in plasma physics, Dr. Phillips was hired by the Naval Research Laboratory in Washington, DC, where he worked on various problems, including the NIKE laser fusion project. Dr. Phillips is now the Chief Scientist of the Alogus Research Corporation, which conducts research in the physical sciences and provides technology assessment for investors.
Read more about Lee Phillips