服务热线
178 0020 3020
任务1
library(ggplot2) dt=data.frame(city=c("A","B","C","D","E"),value=c("20","18","16","14","12")) dt ggplot(dt,aes(x="",y=value,fill=city))+geom_bar(stat="identity",width=1)+coord_polar(theta="y")+labs(x="city",y="value")+ggtitle("R2-01")+theme(axis.ticks = element_blank())+theme(legend.title=element_blank(),legend.position="top")+theme(axis.text.x=element_blank())
任务2
library("lattice") ggplot(data=singer,aes(x = voice.part,y = height,fill = voice.part))+geom_boxplot()+theme(legend.position = 'top',legend.title=element_blank())+ggtitle("R2-01")
附件