Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.1 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Graphics > axes_operations > subplot

subplot

sets the current axes to a chosen cell of the current gridded figure

Syntax

subplot(m,n,p)
subplot(mnp)

Arguments

m, n, p

positive integers

mnp

an integer with decimal notation mnp

Description

subplot(m,n,p) or subplot(mnp) virtually grids the graphics window into an m-by-n matrix of sub-windows, and selects the pth sub-window for receiving the forthcoming drawings.

Into the grid, cells are indexed along each row, starting from the top row. Hence, for instance the last cell of the first row is the p = nth one. The cell on the row #i and the column #j has the index p=(i-1)*n+j.

When the selected area matches exactly an existing axes, subplot(…) just sets it as the current axes, and returns.

Otherwise, subplot(…) creates an empty axes covering the selected area, ready to receive forthcoming plotting contents.

Examples

clf
subplot(221)
plot2d()

subplot(222)
plot3d()

subplot(2,2,3)
param3d()

subplot(2,2,4)
bar3d()

A more complex layout, but still gridable:

clf
subplot(1,2,2)
Matplot1()
xtitle("Matplot1() example","","")

subplot(2,2,1)
histplot
delete(findobj("type","Legend"))

subplot(2,2,3)
title("Smaller plots:", "fontsize",3)

subplot(2,4,5)
polarplot()

subplot(2,4,6)
param3d()
xtitle("","","","")

See also

  • xsetech — set the sub-window of a graphics window for plotting
  • newaxes — Creates a new Axes entity
  • axes_properties — description of the axes entity properties
  • plotframe — plot a frame with scaling and grids. This function is obsolete.
Report an issue
<< sda axes_operations unzoom >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:28 CET 2022