\magnification=\magstephalf
\parskip=0.2cm
\parindent=1.0cm
\def\simlt{\lower.5ex\hbox{$\; \buildrel < \over \sim \;$}}
\def\simgt{\lower.5ex\hbox{$\; \buildrel > \over \sim \;$}}
\tolerance=10000

\noindent {\bf 1. SPECIFYING AXIS LIMITS FOR PLOTS.}
 
	The previous plot example filled the page and the values on the
$x$ axis are simply the index numbers of the points. In practice, you
will usually each point with distinctly defined $x$ and $y$ values and
you will want to plot $y$ versus $x$. Furthermore, you will want to
specify the plot limits so that the data are pleasingly scaled with
respect to the plot window. 

	First, let's define values for the $x$; we will call this
variable $time$. There are 200 data
points, numbered $n = 0 \rightarrow 199$, and let's assume that $time_n
= 3n$ as an example. First generate the values:

	{\bf time = 3. * findgen(200)}

\noindent then plot the values, again with plot labels:

	{\bf plot, time, original, xtitle="Time", ytitle="amplitude"}

\noindent The horizontal axis now runs from 0 to 600, with the last
(199$^{th}$) point equal to 597. 

	To make things slightly more interesting, let's add an offset to
the amplitude:

	{\bf original = original + 2.}

\noindent Now execute the plot command again. The plot occupies the
upper 2/3 of the plot window, which is not very photogenic. You can
specify the boundaries of the plot window using the keywords {\bf
xrange} and {\bf yrange} as follows:

	{\bf plot, time, original, xtitle="Time", ytitle="amplitude", \$}

	{\bf yrange = [0.5, 3.5], xrange = [0, 600]}

\noindent Here the {\bf \$} sign acts as a ``continuation character'',
meaning that the second line is patched onto the first; you use this
when the command line is not long enough for the full command. The
square bracket definition {\bf yrange = [0.5, 3.5]} means that {\bf
yrange} is being defined as a two-element array.

	Note in this plot that you specified 	{\bf yrange = [0.5,
3.5]} but the y plot range went from 0 to 4---contrary to your
specification. This is because IDL attempts to ``round off'' specified
plot ranges. You can force the range to be exactly what you specify by
setting the {\bf ystyle} keyword equal to 1:

	{\bf plot, time, original, xtitle="Time", ytitle="amplitude", \$}

	{\bf yrange = [0.5, 3.5], xrange = [0, 600], ystyle=1}

	The {\bf PLOT} command has many, many options. You can do just
about anything! To learn about it, and to see the documentation on the
above keywords, use IDL's HELP facility by typing 

	{\bf ?}

\noindent or, if you want to specify help for the plot procedure, by typing

	{\bf ?plot}


\noindent {\bf 2. MAKING A HARD COPY OF YOUR PLOT.}

	To make a hard copy of your plot, you first make a postscript
file and print that out. There are several ways to make a postscript
file. We have defined a procedure that bypasses all the details and 
makes it easy. With your plot in full view of the window, type

	{\bf hardplot}

\noindent This procedure reads the pixels on your plot window, prompts
you for a name of the postscript file you will generate, and writes an
image of the plot onto the postscript file. Unless you specify otherwise
the postscript file will be written into the {\it subdirectory from which
you are running IDL}.

	Suppose you have called this postscript file {\it plot.ps}. 
To view this postscript file before printing, use the UNIX
command 

	{\it xv plot.ps}

\noindent The {\it xv} utility has lots of options that you can access
by moving the mouse cursor onto the image and clicking the right-hand
button. Try it!

	Finally, to get a hard copy on the printer use the UNIX command

	{\it lp plot.ps}

\end

 
