title: Randomising qualitative colours for large sets in ggplot
body: <p>If you're mapping qualitatively to colour for a large number of groups, ggplot's automatic colour assignment plots very similar colours adjacently, making it hard to see which refer to which key etc.  To illustrate:</p>
  
  <pre><code>require(ggplot2); require(stringr)
  df = data.frame(x = letters, y = sample(20:100,26), lab=word("apple ball cat dog elephant frog goat hat ice jackal king lion mango nest owl parrot queen rabbit ship tomato umbrella van watch xylophone yatch zebra", 1:26))
  p = ggplot(df, aes(x, y, fill=lab)) + geom_bar(stat="identity")
  p + scale_fill_discrete()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/u7SVc.png" alt="enter image description here"></p>
  
  <p>Its possible to mix up some random colours manually:</p>
  
  <pre><code>cols = rainbow(26, s=.6, v=.9)[sample(1:26,26)]
  p + scale_fill_manual(values=cols)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ASuvd.png" alt="enter image description here"></p>
  
  <p>.. resulting in more useful breakup of the rainbow, but this seems clumsy, still leaves some colours clumped together and is generally not ideal.  Does ggplot have a native method to achieve something like this (but hopefully better)?</p>