R2-07-第二期 -饼图和箱线图

Bamboo 2017-11-27 20:46:54 阅读: 1159

> library("ggplot2")

> getwd()

[1] "C:/Users/Administrator/Desktop/R语言"

> a<-read.csv("R.4-1.csv")

 ggplot(a,aes(x="",y=value,fill=code))+geom_bar(stat="identity",width=1)+coord_polar(theta="y")+labs(x="code",y="value")+ggtitle("R2-07")+theme(legend.title=element_blank(),legend.position="top")+theme(axis.ticks=element_blank())

饼图:

1.png

> library("ggplot2")

> library("lattice")

>ggplot(singer,aes(x=voice.part,y=height,fill=voice.part))+geom_boxplot()+theme(legend.position ='top',legend.title = element_blank())+labs(title="R2-07")

2.png

 
邀请讨论

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
{{item.nick_name}} 受邀请回答 {{item.create_time}}
{{item.refer_comment.nick_name}} {{item.refer_comment.create_time}}

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
切换到完整回复 发送回复
赞({{item.count_zan}}) 踩({{item.count_cai}}) 删除 回复 关闭
科研狗©2015-2025 科研好助手,京ICP备20005780号-1 建议意见

服务热线

178 0020 3020

微信服务号