title: Optimal visualisation of ggplot colours: changing order of colours, keeping original factor ordering
body: <p>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.</p>
  
  <p>Here's an example:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>Giving something like this:
  <img src="https://i.stack.imgur.com/jFJLb.png" alt="enter image description here"></p>
  
  <p>For example, it's very difficult to work out which is <code>d</code> and which is <code>e</code> 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.</p>
  
  <p>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.</p>
  
  <p>I have messed around with different <code>scale_colour_brewer()</code> palettes, but the colours just aren't as pretty.</p>