O'Reilly logo

gnuplot Cookbook by Lee Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Arranging an array of plots

The simplest use of the multiplot mode creates a rectangular array of plots with regular spacing. The following figure is an example of this type of multiple plot:

Arranging an array of plots

In the previous figure, we have made a table of graphs showing the four kinds of Bessel function that gnuplot has built in.

How to do it…

Run this script through gnuplot to get the array of plots shown in the previous figure:

set multiplot layout 2, 2
plot besj0(x)
plot besj1(x)
plot besy0(x)
plot besy1(x)
unset multiplot

How it works…

The new command is in the first line of the recipe. The commands following that are simple plot statements, until we reach the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required