I love the default ggplot2 colour, but with the dataset I'm using, it's very important the reader can tell the difference between two adjacent categories. This is difficult with the default colours, as I have 10 categories and therefore the generated colours are very similar between neighbouring factor groups.
Here's an example:
library(ggplot2)
x=rnorm(100,1,2)
y=rnorm(100,1,2)
category=letters[1:10]
data=cbind.data.frame(x,y,category)
ggplot(data,aes(x,y,colour=category))+stat_smooth(alpha=0)
Giving something like this:
For example, it's very difficult to work out which is d
and which is e
on this graph, as they're both green-ish, and it's important to distinguish between adjacent factor groups for my data. The existing order is crucial as well, and I'd like it to appear in order in the legend.
So my question is; is there a way to keep the lovely default ggplot2 colours (across 10 factor levels), but mix the order round a little so that adjacent categories look a little more distinguishable from each other? In my dataset, non-adjacent categories are usually determinable by their actual distribution, so colour is less crucial for those.
I have messed around with different scale_colour_brewer()
palettes, but the colours just aren't as pretty.