The multi command creates a multiplot in the current subwindow, sets plot defaults.
A multiplot is an array of plots that typically have their axes linked in some way. The commands xgroup and ygroup link x and y axes.
Apart from linking axes, each plot is drawn independently.
The parameter to multi has two forms:
1. a pair of numbers: rows, columns. This sets up a multiplot array using equal divisions of the current window for each element of the shape.
For example:
pd 'multi 2 3'creates a 2 row by 3 column multiplot.
2. a pair of lists, separated by comma: relative size of each row, relative size of each column
For example:
pd 'multi 4 2, 1 1 2'creates a 2 row by 3 column multiplot. The first row has twice the height of the second, and the last column has twice the width of the first two columns.
The multi command should be followed by zero or more options, then the data for the multiplot.
The options are the same as before, with the following extensions:
1. Axis groups:
xgroup
pd 'xgroup keylist'sets the xgroups for the multiplots.
The default for a multiplot of shape r c is:
pd 'xgroup ',": ,i. r,c'Here, keylist is either a single number, or a list of length c, or list of length r * c. Plots with the same key value are drawn to the same x group.
ygroup
pd 'ygroup keylist'sets the ygroups for the multiplots.
The default for a multiplot of shape r c is:
pd 'ygroup ',": ,i. r,c'Here, keylist is either a single number, or a list of length r, or list of length r * c. Plots with the same key value are drawn to the same y group.
For example:
a) all graphs independent (the default)
pd 'xgroup ',": ,i.r,c' pd 'ygroup ',": ,i.r,c'b) all graphs in a row have the same y axis and all graphs in a column the same x axis
pd 'xgroup ',": i.c pd 'ygroup ',": i.rc) all graphs with the same axes.
pd 'xgroup 0' pd 'ygroup 0'd) A cross shaped pattern:
pd 'xgroup 0 1 0 2 1 3 0 1 0' pd 'ygroup 0 1 0 2 2 2 0 3 0'2. Captions:
The following gives captions for each column, and similarly for each row:
pd 'xcaption "col 1" "col 2" "col3"'3. Keys
An initial Key definition is for the entire multiplot and must be an outside key.
Each plot may also have its own Key definition.
4. The data for a multiplot is a boxed list, with one item for each plot.
Each item is either a 2-element list, or a 2-column table of:
options;datawhere:
Restrictions
Second Y axes and 3D plots are not yet supported in multiplots.