服务热线
178 0020 3020
> data<-read.csv("F:\\研究生\\R语言\\R.4-1.csv",header=F)
> data
V1
1 编号\t代码\t值\t
2 1\tA\t20\t
3 2\tB\t18\t
4 3\tC\t16\t
5 4\tD\t14\t
6 5\tE\t12\t
> data <- data.frame(city=c("A","B","C","D","E"),value=c("20","18","16","14","12"))
>ggplot(data,aes(x="",y=value,fill=city))+geom_bar(stat="identity",width=1)+coord_polar(theta="y")+labs(x="city",y="value")+ggtitle("R02-28")+theme(legend.title=element_blank(),legend.position="top")+theme(axis.ticks=element_blank())
> data(singer,package="lattice")
>ggplot(singer,aes(x=voice.part,y=height,fill=voice.part))+geom_boxplot()+theme(legend.title=element_blank(),legend.position="top")+ggtitle("R02-28")
附件