|
> library(vcd)
> counts<-table(Arthritis$Improved,Arthritis$Treatment)
> counts
Placebo Treated
None 29 13
Some 7 7
Marked 7 21
> barplot(counts,main="Stacked bar plot",xlab="treatment",ylab="frequency",
+col=c("red","blue","green"),legend=rownames(counts))
想修改图例的位置、字体等参数,用legend("top",legend=rownames(counts)改出来是这样
怎么改,新手求助???
|
|