xlabel

Annotates the x-axis.

Syntax

h = xlabel(str)

h = xlabel(hAxes, str)

h = xlabel(..., property, value, ...)

Inputs

str
Name of the x-axis.
Type: char | string
Dimension: scalar
hAxes
Axis handle.
Type: double
Dimension: scalar
property
Properties that control the appearance or behavior of the graphics object.
Type: string
Dimension: scalar
value
Value of the properties.
Type: double | integer | string
Dimension: scalar

Outputs

h
Handle of the label graphics object.

Examples

Simple xlabel example:
clf;
handle = xlabel('this is xlabel')


Figure 1. Simple xlabel example
Optional arguments example:
clf;
handle = xlabel('this is xlabel', 'fontsize', 12, 'fontweight', 'bold')


Figure 2. Optional arguments in the xlabel command