全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2301 1
2019-05-05
cmn
Sweden2014454088
Nordic countries201446019
European countries201425068
Other countries201417100
Sweden2015485509
Nordic countries201544467
European countries201526994
Other countries201514261
Sweden2016542091
Nordic countries201651562
European countries201633767
Other countries201616360
Sweden2017560829
Nordic countries201756723
European countries201734139
Other countries201723839
Sweden2018548372
Nordic countries201856441
European countries201844513
Other countries201834174


数据表如图,代码如下:

ggplot(summary,aes(x=m,y=n,fill=c,label=n))+
  geom_bar(stat="identity",position="dodge")+
  theme_wsj(color="white")+
  scale_fill_wsj("rgby", "")+
  scale_y_continuous(breaks = seq(50000,800000,100000))+
  theme(axis.ticks.length=unit(0.5,'cm'))+
  guides(fill=guide_legend(title=NULL))+
  theme(axis.title = element_blank())
  geom_text(aes(y = n + 0.05), position = position_dodge(0.9), vjust = -0.5)


数据出图如下,问题是,如何将柱图在每年内按降序排列?

代码出图
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2019-5-5 09:33:49
复制代码


重新排列.png
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群