I've tried everywhere to find a solution for my problem, without success. In my company we have a R project, where we use our own colors to print the plots. One of our colleagues is having trouble with it, and we can't figure it out why (since the plot is working fine for all other colleagues and we all -including her- have the same version of R, R Studio and packages).
The problem is when she is printing the plots, the legend is totally weird and printing way more information (from other plots). We tried everything we could think of...
Unfortunetely I can't display the whole code/plots since is confidential information, but I hope this can help:
correct plot should look like this
The code is more or less, this one:
ggplot(df , aes(x = factor(columnA), y = value ,fill=factor(variable))) +
geom_bar(stat='identity',position="stack")+
labs(x=element_blank(),y="label")+
scale_x_discrete(breaks = df$columnA ,labels=str_wrap(df$columnB, 15) ) +
ggtitle("Confidential tile") +
theme_ourown + #we have our own theme as well
theme(panel.grid.major = element_line(colour = "grey90"),
axis.ticks = element_blank(), axis.title = element_blank(), axis.text.x = element_text(colour = "grey30"),
axis.text.y = element_blank(), legend.title = element_blank(), plot.title = element_text(hjust = 0.5),
legend.text = element_text(size = rel(1.33)), legend.key.size = unit(1, "cm")) +
scale_fill_manual(values = report_colours) + #here is our colors
coord_polar()
Well, thank you all in advance!