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.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> GUI > figure


create a figure


f = figure(num);
f = figure("PropertyName1", Propertyvalue1, ..., ..., "PropertyNameN", PropertyvalueN);


This routine creates a figure. If an ID is given, the figure corresponding to this ID is created. Otherwise, the window is created with the first free ID, that is the lowest integer not already used by a window.



ID of the window to create. If not specified, the first free ID is used.

PropertyName{1, ..., N}

character string: Name of a property to set, among all existing ones.

  • 'dockable', 'toolbar' and 'menubar' properties can be set only at figure's creation.
  • 'resizefcn': when it is set at figure's creation, the callback is first executed while building the initial figure. Hence it must already be defined and callable.
PropertyValue{1, ..., N}

scilab object value to give to the corresponding property.


handle of the newly created window.


// Create figure having figure_id==3
// Add a text uicontrol in figure 3
uicontrol(h, "style", "text", ...
             "string", "This is a figure", ...
             "position", [50 70 100 100], ...

// Create figure having figure_id==1
// Add a text uicontrol in figure 1
uicontrol("style", "text", ...
          "string", "Another figure", ...
          "position", [50 70 100 100], ...
          "fontsize", 15);

// Close current figure (ie figure 1)
// close figure 3

See also

  • scf — set the current graphic figure (window)
  • gcf — Return handle of current graphic window.
  • createWindow — create a window
  • figure_properties — description of the graphics figure entity properties
  • close — Closes graphic figures, progression or wait bars, the help browser, xcos, the variables browser or editor.
Report an issue
<< exportUI GUI findobj >>

Copyright (c) 2022-2024 (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:29 CET 2022