title: Change ggplot coloured lines in legend to squares or circles
body: <p>Instead of the coloured lines on a grey background that currently make up the legend key, I would like squares or circles of colour next to the key label in order for the colors to be easily visible. How can I do that? Here is a code snippet to use as an example: </p>
  
  <pre><code> mry &lt;- do.call(rbind, by(movies, round(movies$rating), function(df) {
     nums &lt;- tapply(df$length, df$year, length)
     data.frame(rating=round(df$rating[1]), year = as.numeric(names(nums)),
     number=as.vector(nums))
   }))
  
  ggplot(mry, aes(x=year, y=number, colour=factor(rating))) + geom_line() +
  scale_colour_brewer(palette="YlGnBu")
  </code></pre>