I was doing a dark mode RMarkdown page and had problems with ggplot2 theme parameters.
I used bar_point, geom_col for other graphs and the image shows how I want it to.
The problem is when I want to introduce a pie chart using geom_point, there is an outer panel background color set to white and I can't seem to change its color.
Here is a bar-chart with no problems (other than the label name but shhh)
Note: No white outer space in "Specific" tab so it is really the pie chart's image
There are two things I would like to have here today;
I would need the white to be filled by tblCol and also I can't seem to render the filled colors with alpha option inside scale_fill_manual like I would inside geom
Here is the code for the pie chart:
filter(df_Agg, Category == "Total" | Category == "Issued") %>% ggplot(mapping = aes(x = "", y = Amount, fill = Category)) + geom_bar(stat = "identity", width = 0.75) + geom_col(color = tblCol) + geom_text(aes(label = Amount), position = position_stack(vjust = 0.5)) + labs(title = "Data Validity", x = "", y = "") + coord_polar(theta = "y", start = 0) + scale_fill_manual(values = c("red", "green")) + theme(axis.title.x = element_text(color = tblCol), axis.title.y = element_text(color = tblCol), axis.text.x = element_blank(), axis.ticks = element_blank(), legend.background = element_rect(fill = tblCol), legend.key = element_rect(fill = tblCol), legend.text = element_text(color = tblCol), legend.title = element_text(color = tblCol), legend.position = "right", panel.background = element_rect(fill = tblCol, color = tblCol), panel.grid = element_blank(), panel.border = element_rect(fill = NA, color = tblCol, size = 1), plot.background = element_rect(fill = tblCol, color = tblCol), plot.title = element_text(color = tblCol, hjust = 0.5), plot.margin = unit(c(1, 1, 0.5, 0.5), "lines"))
I find it confusing how on the internet there is either lack of explanation or lack of complexity or in-depth about ggplot theme topic. Creating custom theme research leads to custom theme using pre-made themes..