Entering edit mode
8.4 years ago
james.lloyd
▴
100
I have a palette in ggplot that I like (eg PuOr) but I want to find the individual colors that it calls when it runs (eg on 8 variables)?
My issue is when I run this, coloring by variable (I have 8 different categories), it will have instances of each of those 8 for the full dataset. But a small subset by chance will only have 3 or 4 of those variables but I want to keep the colors the same for the subset plots as the full plot. I can hack this I think if I know the color codes that PuOr calls but cannot find this out.
Brilliant. brewer.pal(8, "PuOr") appears to have worked! Many thanks!