\section{XLIM Adjust X Axis limits of plot}

\subsection{Usage}

There are several ways to use \verb|xlim| to adjust the X axis limits of
a plot.  The various syntaxes are
\begin{verbatim}
   xlim
   xlim([lo,hi])   
   xlim('auto')
   xlim('manual')
   xlim('mode')
   xlim(handle,...)
\end{verbatim}
The first form (without arguments), returns a 2-vector containing the
current limits.  The second form sets the limits on the plot to \verb|[lo,hi]|.
The third and fourth form set the mode for the limit to \verb|auto| and \verb|manual|
respectively.  In \verb|auto| mode, FreeMat chooses the range for the axis 
automatically.  The \verb|xlim('mode')| form returns the current mode for the axis
(either \verb|'auto'| or \verb|'manual'|).  Finally, you can specify the handle of an
axis to manipulate instead of using the current one.
\subsection{Example}

\begin{verbatim}
--> x = linspace(-1,1);
--> y = sin(2*pi*x);
--> plot(x,y,'r-');
--> xlim  % what are the current limits?

ans = 

 -1  1 


\end{verbatim}
which results in


\centerline{\includegraphics[width=8cm]{xlim1}}

Next, we zoom in on the plot using the \verb|xlim| function
\begin{verbatim}
--> plot(x,y,'r-')
--> xlim([-0.2,0.2])

\end{verbatim}
which results in


\centerline{\includegraphics[width=8cm]{xlim2}}

