Remove colored border around ggplot

人盡茶涼 提交于 2019-12-01 21:13:05

It's the argument colour = NA in theme(plot.backround = ... ) you are looking for.

Pie_chart <- ggplot(df , aes(x = "", y = prop_1, fill = rank) ) +
  geom_bar(stat="identity", width=2) +
  coord_polar("y", start = 0) + 
  labs(x = NULL, y = NULL, fill = NULL, title = "") + 
  theme(axis.line = element_blank(), axis.text = element_blank(), axis.ticks = element_blank(), legend.position="none")+
  theme(plot.margin = unit(c(0.0, 0.0, 0.0, 0.0), "cm"),
        plot.background = element_rect(fill = "blue", 
                                       colour = NA), # here it is
        panel.background = element_rect(fill = "blue"))

...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!