Reputation: 719
I am using ggplot2 to plot a simple graph with scale_color_brewer(palette="Dark2")
. I generally like the colour palette, but I would like to change one line of my plot. I think I need to use scale_color_manual
. I can change the colours this way, but how to find out which colours are used in the "Dark2" theme? I would like to keep all but one.
Upvotes: 3
Views: 1957
Reputation: 2643
You can use the RColorBrewer
library
library(RColorBrewer)
# Put all the color values (in hex format) from Dark2 into a vector
myPal <- brewer.pal(8,"Dark2")
# Remove whichever color you don't want
myPal <- myPal[-7]
Upvotes: 3