\Header{title}{Plot Annotation}
\keyword{aplot}{title}
\begin{Usage}
\begin{verbatim}
title(main = "", sub = "", xlab = "", ylab = "", ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{main}] The main title (on top) using font and size (character
expansion) \texttt{par("font.main")} and color
\texttt{par("col.main")}.
\item[\texttt{sub}] Sub-title (at bottom) using font and size
\texttt{par("font.sub")} and color \texttt{par("col.sub")}.
\item[\texttt{xlab}] X axis label using font and character expansion
\texttt{par("font.axis")} and color \texttt{par("col.axis")}.
\item[\texttt{ylab}] Y axis label, same font attributes as \texttt{xlab}.
\item[\texttt{...}] further graphical parameters (from \texttt{\Link{par}}).
\end{ldescription}
\end{Arguments}
\begin{Description}
This function can be used to add labels to a plot.  Its first four
principal arguments can also be used as arguments in most high-level
plotting functions.  They must be of type \texttt{\Link{character}} or
\texttt{\Link{expression}}. In the latter case, quite a bit of
mathematical notation is available such as sub- and superscripts,
greek letters, fractions, etc.\end{Description}
\begin{SeeAlso}
\texttt{\Link{mtext}}, \texttt{\Link{text}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}


plot(cars, main = "")
title(main = "Stopping Distance versus Speed")

x <- seq(-4, 4, len = 101)
y <- cbind(sin(x), cos(x))
matplot(x, y, type = "l", xaxt = "n",
        main = expression(paste(plain(sin) * phi, "  and  ",
                                plain(cos) * phi)),
	ylab = expression("sin" * phi, "cos" * phi),    # only 1st is taken
	xlab = expression(paste("Phase Angle ", phi)),
	col.main = "blue")
axis(1, at = c(-pi, -pi/2, 0, pi/2, pi),
     lab = expression(-pi, -pi/2, 0, pi/2, pi))
abline(h = 0, v = pi/2 * c(-1,1), lty = 2, lwd = .1, col = "gray70")

plot(cars, main = "")
title(main = "Stopping Distance versus Speed")

x <- seq(-4, 4, len = 101)
y <- cbind(sin(x), cos(x))
matplot(x, y, type = "l", xaxt = "n",
        main = expression(paste(plain(sin) * phi, "  and  ",
                                plain(cos) * phi)),
	ylab = expression("sin" * phi, "cos" * phi),    # only 1st is taken
	xlab = expression(paste("Phase Angle ", phi)),
	col.main = "blue")
axis(1, at = c(-pi, -pi/2, 0, pi/2, pi),
     lab = expression(-pi, -pi/2, 0, pi/2, pi))
abline(h = 0, v = pi/2 * c(-1,1), lty = 2, lwd = .1, col = "gray70")
\end{ExampleCode}
\end{Examples}

