next up previous contents
Next: YLABEL Plot Y-axis Label Up: Plot Functions Previous: Plot Functions   Contents

Subsections

XLABEL Plot X-axis Label Function

Usage

This command adds a label to the x-axis of the plot. The general syntax for its use is

  xlabel('label')

or in the alternate form

  xlabel 'label'

or simply

  xlabel label

Here label is a string variable.

Example

Here is an example of a simple plot with a label on the x-axis.

--> x = linspace(-1,1);
--> y = cos(2*pi*x);
--> plot(x,y,'r-');
--> xlabel('time');

which results in the following plot.

8893



Samit K. Basu 2005-03-16