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

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

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

Scilab Help >> Graphics > annotation > xlabel

xlabel

sets the x-axis label

ylabel

sets the y-axis label

zlabel

sets the z-axis label

Calling Sequence

xlabel([axis_handle], label, [property_name, property_value,...])
ylabel([axis_handle], label, [property_name, property_value,...])
zlabel([axis_handle], label, [property_name, property_value,...])

Arguments

label

a string, containing the label value.

axis_handle

an optional handle, to specify the axes for which the label is set.

[property_name, property_value,...]

an optional sequence of name-value pairs, to specify the text properties of the label (related to the text properties described here).

The available properties for x-y-zlabel are:

  • "visible": "on" or "off"

  • "fontsize": size of font (constant)

  • "fontname": ten font names are available (case unsensitive string or related id number): "courrier" | 0, "symbol" | 1, "times" | 2, "times italic" | 3, "times bold" | 4, "times bold italic" | 5, "helvetica" | 6, "helvetica italic" | 7, "helvetica bold" | 8, "helvetica bold italic" | 9.

  • "rotation": angle in degrees (constant)

  • "position": position of label (2d vector)

  • "color": the color of font (a string value chosen among ["red","green","blue","cyan","magenta","yellow","black","white"], or a RGB matrix value)

  • "edgecolor": the color of line around the text (a string value chosen among ["red","green","blue","cyan","magenta","yellow","black","white"], or a RGB matrix value)

  • "background": the color of background around the text (a string value chosen among ["red","green","blue","cyan","magenta","yellow","black","white"], or a RGB matrix value)

Description

xlabel, ylabel, zlabel are used to label the x-, y-, and z-axis, respectively.

Each label appears beneath its respective axis in a two-dimensional plot and to the side or beneath the axis in a three-dimensional plot.

Examples

t = linspace(-2*%pi, 2*%pi, 30);

subplot(2,1,1);
plot(t, sin(t), "r");
xlabel("t", "fontsize", 2);
ylabel("sin(t)");
axis1_handle = gca();

subplot(2,1,2);
plot(t, cos(t), "b");
xlabel("t", "fontsize", 2);
ylabel("cos(t)", "fontsize", 6, "color", "blue");

ylabel(axis1_handle, "sin(t)", "fontsize", 6, "color", "red");

See Also

  • title — display a title on a graphic window
Report an issue
<< title annotation xtitle >>

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:
Fri Apr 11 14:06:54 CEST 2014