MATLAB Functions | Help Desk |
xlabel, ylabel, zlabel
Label the x-, y-, and z-axisxlabel('Each Axes graphics object can have one label for the x-, y-, and z-axis. The label appears beneath its respective axis in a two-dimensional plot and to the side or beneath the axis in a three-dimensional plot.string
') xlabel(fname) xlabel(...,'PropertyName
',PropertyValue,...) h = xlabel(...) ylabel(...) h = ylabel(...) zlabel(...) h = zlabel(...)
xlabel('string
')
labels the x-axis of the current Axes.
xlabel(fname)
evaluates the function fname
, which must return a string, then displays the string beside the x-axis.
xlabel(...,'PropertName
',PropertyValue,...)
specifies property name and property value pairs for the Text graphics object created by xlabel
.
h = xlabel(...), h = ylabel(...), and h = zlabel(...)
return the handle to the text object used as the label.
ylabel(...) and zlabel(...)
label the y-axis and z-axis, respectively, of the current Axes.
Re-issuing an xlabel
, ylabel
, or zlabel
command causes the new label to replace the old label.
For three-dimensional graphics, MATLAB puts the label in the front or side, so that it is never hidden by the plot.
text
, title