15.2.5 Multiple Plot Windows

You can open multiple plot windows using the figure function. For example,

figure (1);
fplot (@sin, [-10, 10]);
figure (2);
fplot (@cos, [-10, 10]);

creates two figures, with the first displaying a sine wave and the second a cosine wave. Figure numbers must be positive integers.

: figure
: figure n
: figure (n)
: figure (…, "property", value, …)
: h = figure (…)

Create a new figure window for plotting.

If no arguments are specified, a new figure with the next available number is created.

If called with an integer n, and no such numbered figure exists, then a new figure with the specified number is created. If the figure already exists then it is made visible and becomes the current figure for plotting.

Multiple property-value pairs may be specified for the figure object, but they must appear in pairs.

The optional return value h is a graphics handle to the created figure object.

Programming Note: The full list of properties is documented at Figure Properties.

See also: axes, gcf, shg, clf, close.

© 1996–2020 John W. Eaton
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
https://octave.org/doc/v6.3.0/Multiple-Plot-Windows.html