服务热线
178 0020 3020
任务1:
a=read.csv("R.4-1.csv")
p=ggplot(a,aes(x="",y=值,fill=代码))
p+geom_bar(stat="identity")+coord_polar(theta="y",direction=-1)+theme_bw()+theme(panel.border = element_blank(),panel.grid.major = element_blank(),panel.grid.minor = element_blank(),text=element_text(family="STKaiti",size=12))+ggtitle("R2-21")+labs(x="city",y="value")
任务2:
library(lattice)
p=ggplot(singer,aes(x=voice.part,y=heigt,fill=voice.part))
p+geom_boxplot()+theme(legend.position = "top")+guides(fill=guide_legend(title=NULL))+ggtitle("R2-21")
附件