Skip to content

xlabel

plot · scripts/plot/appearance/xlabel.m

: h = xlabel (str)
: h = xlabel (ax, str)
: h = xlabel (…, prop, val, …)

Set the text label of the x axis.

str is a character array or a cell array of character vectors (one line per element); an empty value clears the label. Trailing property/value pairs are applied to the text object, for example "FontSize" or "Interpreter". The label is the text object stored in the axes property "xlabel"; the same object is reused by later calls and its handle is returned.