title: Colouring plot by factor in R
body: <p>I am making a scatter plot of two variables and would like to colour the points by a factor variable. Here is some reproducible code:</p>
  
  <pre><code>data &lt;- iris
  plot(data$Sepal.Length, data$Sepal.Width, col=data$Species)
  </code></pre>
  
  <p>This is all well and good but how do I know what factor has been coloured what colour?? </p>