[R] Stacked Bar Plot

RICHARD M. HEIBERGER rmh at temple.edu
Sat Nov 21 02:03:39 CET 2009


tmp <- cbind(x=c(1,-.2,.3,.4),
             y=c(.5,.6,-.7,.8))
row.names(tmp) <- letters[1:4]
barchart(tmp,
         horizontal=FALSE,
         stack=TRUE,
         auto.key=list(
           title="pollutant",
           border=TRUE),
         xlab="Month",
         main="Interesting Plot")

barchart(tmp,
         horizontal=FALSE,
         stack=TRUE,
         auto.key=list(
           title="pollutant",
           cex.title=1.2,
           border=TRUE),
         xlab="Month",
         ylab="something else",
         main="Interesting Plot")




More information about the R-help mailing list