Getting a stacked area plot in R

前端 未结 3 1427
你的背包
你的背包 2020-11-28 10:01

This question is a continuation of the previous question I asked.

Now I have a case where there is also a category column with Prop. So, the dataset becomes like

3条回答
  •  囚心锁ツ
    2020-11-28 10:22

    If you want to take the borders away you can use scale_x_discrete and coord_cartesian this way

     p <- ggplot(d, aes(x=Date,y=Volume,group=Platform,fill=Platform)) + geom_area(position="fill")
     base_size <- 9
     p + theme_set(theme_bw(base_size=9)) + scale_x_discrete(expand = c(0, 0)) +  coord_cartesian(ylim=c(0,1))
    

提交回复
热议问题