A explicação do script a seguir está no artigo R na Prática – Parte 26.
parAtuais=par(no.readonly=TRUE)
#setwd("C:\\geoStats\\figuras\\chap3")
#jpeg("Fig3_14.jpeg",width=5,height=5,
#units="in",res=300)
par(mfrow=c(2,2))
barplot(height=c(1,2,3),main="vetor=c(1,2,3)",
col=c("red","green","blue"))
barplot(height=matrix(1:9,ncol=3,nrow=3),
main="matriz[3,3]",col=c("darkslategray",
"darkseagreen","beige"))
barplot(height=t(matrix(1:9,ncol=3,nrow=3)),
main="t(matriz[3,3])",col=c("darkslategray",
"darkseagreen","beige"))
library(compositions)
matriz=acomp(matrix(1:9,ncol=3,nrow=3))
barplot(height=matriz,main="acomp(matriz)",
col=c("darkslategray","darkseagreen","beige"))
par(parAtuais)
#dev.off()