www.delorie.com/gnu/docs/octave/octave_130.html   search  
 
Buy GNU books!


GNU Octave

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.5 Multiple Plots on One Page

The following functions all require a version of gnuplot that supports the multiplot feature.

Function File: mplot (x, y)
Function File: mplot (x, y, fmt)
Function File: mplot (x1, y1, x2, y2)
This is a modified version of the plot function that works with the multiplot version of gnuplot to plot multiple plots per page. This plot version automatically advances to the next subplot position after each set of arguments are processed.

See the description of the plot function for the various options.

Function File: multiplot (xn, yn)
Sets and resets multiplot mode.

If the arguments are non-zero, multiplot will set up multiplot mode with xn, yn subplots along the x and y axes. If both arguments are zero, multiplot closes multiplot mode.

Function File: oneplot ()
If in multiplot mode, switches to single plot mode.

Function File: plot_border (...)
Multiple arguments allowed to specify the sides on which the border is shown. Allowed arguments include:

"blank"
No borders displayed.

"all"
All borders displayed

"north"
North Border

"south"
South Border

"east"
East Border

"west"
West Border

The arguments may be abbreviated to single characters. Without any arguments, plot_border turns borders off.

Function File: subplot (rows, cols, index)
Function File: subplot (rcn)
Sets gnuplot in multiplot mode and plots in location given by index (there are cols by rows subwindows).

Input:

rows
Number of rows in subplot grid.

columns
Number of columns in subplot grid.

index
Index of subplot where to make the next plot.

If only one argument is supplied, then it must be a three digit value specifying the location in digits 1 (rows) and 2 (columns) and the plot index in digit 3.

The plot index runs row-wise. First all the columns in a row are filled and then the next row is filled.

For example, a plot with 4 by 2 grid will have plot indices running as follows:
 
+-----+-----+-----+-----+
|  1  |  2  |  3  |  4  |
+-----+-----+-----+-----+
|  5  |  6  |  7  |  8  |
+-----+-----+-----+-----+

Function File: subwindow (xn, yn)
Sets the subwindow position in multiplot mode for the next plot. The multiplot mode has to be previously initialized using the multiplot function, otherwise this command just becomes an alias to multiplot

Function File: top_title (string)
Function File: bottom_title (string)
Makes a title with text string at the top (bottom) of the plot.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003