The R Project SVN R

Rev

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

Rev 348 Rev 437
Line 54... Line 54...
54
\value{
54
\value{
55
  A numeric vector, giving the coordinates of the bar midpoints drawn,
55
  A numeric vector, giving the coordinates of the bar midpoints drawn,
56
  useful for adding to the graph.
56
  useful for adding to the graph.
57
}
57
}
58
\seealso{
58
\seealso{
-
 
59
  \code{\link{plot}(\dots,type="h")},
59
  \code{\link{dotplot}}, \code{\link{hist}}.
60
  \code{\link{dotplot}}, \code{\link{hist}}.
60
}
61
}
61
\examples{
62
\examples{
-
 
63
tN <- table(Ni <- rpois(100, lambda=5))
-
 
64
r <- barplot(tN, col='gray')
-
 
65
points(r, tN, type='h', col='red', lwd=2)#- type = "h" plotting *is* `bar'plot
-
 
66
 
62
data(deaths)
67
data(deaths)
63
mp <- barplot(deaths) # default
68
mp <- barplot(deaths) # default
64
tot <- apply(deaths,2,sum); text(mp, tot + 3, format(tot))
69
tot <- apply(deaths,2,sum); text(mp, tot + 3, format(tot))
65
barplot(deaths, beside = TRUE,
70
barplot(deaths, beside = TRUE,
66
        col = c("lightblue", "mistyrose", "lightcyan",
71
        col = c("lightblue", "mistyrose", "lightcyan",