Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語 - Русский

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

Aide de Scilab >> Graphiques > axes_operations > newaxes


Creates a new Axes entity


a = newaxes()
a = newaxes(h)



Optional handle of the graphic parent of the new axes, of type Figure or Uicontrol of style Frame. By default, the current figure is used.


Handle on the newly created Axes entity


newaxes() is used to create a new Axes entity (see graphics_entities) in the current figure or in the given figure or uicontrol frame.

The properties of this entity are inherited from the default_axes entity (see gda)

newaxes(h) creates the axes in the frame uicontrol or figure whose handle is h.


a1 = newaxes();
a1.axes_bounds = [0,0,1.0,0.5];
t = 0:0.1:20;
a2 = newaxes();
a2.axes_bounds = [0,0.5,1.0,0.5];
x = 0:0.1:4;

sca(a1); //make first axes current
plot(t, asinh(t), 'g')

The following example uses newaxes(h)

// Create a new figure
f = figure("layout", "gridbag", ...
    "toolbar", "none", ...
    "menubar", "none", ...
    "backgroundcolor", [1 1 1]);

// Create the frames where each graph is put
c = createConstraints("gridbag", [1 1 1 1], [1 1], "both");
top_left = uicontrol(f, "style", "frame","constraints", c);

c.grid = [2 1 1 1];
top_right = uicontrol(f, "style", "frame", "constraints", c);

c.grid = [1 2 2 2];
bottom = uicontrol(f, "style", "frame", "constraints", c);

// Create the axes in each frame
a_tl = newaxes(top_left);
a_tr = newaxes(top_right);
a_bt = newaxes(bottom);

// Plot in the frames
X = (1:100) ./ 50;
plot(a_tl, X, X, "r");
plot(a_tr, X, cos(2 * %pi * 3 * X), "g");
plot(a_bt, X, exp(X), "b");

title(a_tl, "a line");
title(a_tr, "a cosine");
title(a_bt, "the exponential");

See also

  • subplot — quadrille virtuellement la figure et fixe la zone de dessin dans une case choisie
  • xsetech — sélectionne la sous-fenêtre d'une fenêtre graphique pour les dessins
  • gda — Return handle of default axes.
  • sca — set the current axes entity


5.5.0 newaxes(h) can target a uicontrol frame or a given figure.
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:06:37 CET 2017