I am adding ggplots
to viewports
. Both ggplot
and viewport
has the same background colour. My problem is that I hav
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"))
...