#CHAPTER 5
#Recipe 1. 多个因素变量条形图Creating Bar charts with more than one factor variable
install.packages("RColorBrewer") #if not already installed
library(RColorBrewer)
citysales<-read.csv("citysales.csv")
barplot(as.matrix(citysales[,2:4]), beside=TRUE,
legend.text=citysales$City,
args.legend=list(bty="n",horiz=TRUE),
col=brewer.pal(5,"Set1"),
border="white",
ylim=c(0,100),
ylab="Sales Revenue (1,000's of USD)",
mai......
阅读全文