The R Project SVN R

Rev

Rev 27447 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27447 Rev 27653
Line 10... Line 10...
10
          \code{plot} method} can be provided.}
10
          \code{plot} method} can be provided.}
11
  \item{y}{the y coordinates of points in the plot, \emph{optional}
11
  \item{y}{the y coordinates of points in the plot, \emph{optional}
12
      if \code{x} is an appropriate structure.}
12
      if \code{x} is an appropriate structure.}
13
  \item{\dots}{graphical parameters can be given as arguments to
13
  \item{\dots}{graphical parameters can be given as arguments to
14
    \code{plot}.  Many methods will also accept the following arguments:
14
    \code{plot}.  Many methods will also accept the following arguments:
15
    
15
 
16
    \item{type}{what type of plot should be drawn.  Possible types are
16
    \item{type}{what type of plot should be drawn.  Possible types are
17
      \itemize{
17
      \itemize{
18
	\item \code{"p"} for \bold{p}oints,
18
	\item \code{"p"} for \bold{p}oints,
19
	\item \code{"l"} for \bold{l}ines,
19
	\item \code{"l"} for \bold{l}ines,
20
	\item \code{"b"} for \bold{b}oth,
20
	\item \code{"b"} for \bold{b}oth,
Line 65... Line 65...
65
 
65
 
66
## Discrete Distribution Plot:
66
## Discrete Distribution Plot:
67
plot(table(rpois(100,5)), type = "h", col = "red", lwd=10,
67
plot(table(rpois(100,5)), type = "h", col = "red", lwd=10,
68
     main="rpois(100,lambda=5)")
68
     main="rpois(100,lambda=5)")
69
 
69
 
70
## Simple quantiles/ECDF, see ecdf() {library(stepfun)} for a better one:
70
## Simple quantiles/ECDF, see ecdf() {library(stats)} for a better one:
71
plot(x <- sort(rnorm(47)), type = "s", main = "plot(x, type = \"s\")")
71
plot(x <- sort(rnorm(47)), type = "s", main = "plot(x, type = \"s\")")
72
points(x, cex = .5, col = "dark red")
72
points(x, cex = .5, col = "dark red")
73
}
73
}
74
\keyword{hplot}
74
\keyword{hplot}