I have a line chart with an ribbon between first and third quartil of the data. When I plot the data with ggplot2 I get boxes around the labels which I don't get rid of whatever I try (i. e. theme(legend.background=element_blank()) or guides(guides_legend) with override). dataframe Here are the first rows of my dataset and the code:
mutate(code_range = fct_reorder2(code_range, year, order)) %>%
ggplot(aes(x=year, y=value, group=code_range, color=code_range)) +
geom_ribbon(aes(ymin = min_range,
ymax = max_range), fill = "grey70", alpha=0.1) +
geom_line(size=1) +
labs(title="Title",
subtitle=paste0("subtitle"),
x="",y="",
caption="Source") +
scale_colour_manual(values = c("min" = "#878787", "q1" = "#B5B5B5", "median" = "#27408B",
"q3" = "#B5B5B5", "max" = "#878787")) +
scale_fill_manual(values = c("min" = "#FFFFFF", "q1" = "#B5B5B5", "median" = "#27408B",
"q3" = "#B5B5B5", "max" = "#878787")) +
theme_opts +
theme(legend.title = element_blank(),
legend.position = "bottom") +
theme(legend.background=element_blank())
plot
Does anybody know a solution how to remove those boxes?