Skip to content
Prev 201035 / 398503 Next

Stacked Bar Plot

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")