0

I have two datasets with a categorical variable. I want to have the colors in the plot the same when I use this variable.

How can I do this?

This is the code:

percmarkt <- ggplot(tabelmarktaandeel, aes(x=Jaar, y=Percentage, fill=Verzekeraar)) + geom_bar(stat="summary", fun.y="sum") + scale_fill_manual(values=corp_palette)

percmarkthist <- ggplot(tabelmarktaandeelhist, aes(x=Jaar, y=Percentage, fill=Verzekeraar_Historie)) + geom_bar(stat="summary", fun.y="sum") + scale_fill_manual(values=corp_palette)

I want the colors for the fill Verzekeraar and Verzekeraar_Historie to be the same, when the name of the categorie is the same.

SuGer
  • 11
  • 4

0 Answers0