服务热线
178 0020 3020
任务一:
library(ggplot2)
a=data.frame(value=c("20","18","16","14","12"),city=c("A","B","C","D","E"))
h=ggplot(a,aes(x="",y=value,fill=city))+geom_bar(stat="identity")+coord_polar(theta="y")
h+labs(title="R2-22")+ylab("value")+xlab("city")+theme(legend.position = "top")
任务二:
library(ggplot2)
library(lattice)
lattice::singer
z=ggplot(singer,aes(x=voice.part,y=height,fill=voice.part))+geom_boxplot()+theme(legend.position = "top")
z+labs(title="R2-22")
z
附件