title: Numbered point labels plus a legend in a scatterplot
body: <p>I am trying to label points in a scatterplot in R (<code>ggplot2</code>) using numbers (1, 2, 3, ...) and then match the numbers to names in a legend (1 - Alpha, 2 - Bravo, 3 - Charlie... ), as a way of dealing with too many, too long labels on the plot.</p>
  
  <p>Let's assume this is a.df:</p>
  
  <pre>
  Name      X Attribute   Y Attribute  Size Attribute  Color Attribute
  Alpha     1             2.5          10              A
  Bravo     3             3.5          5               B
  Charlie   2             1.5          10              C
  Delta     5             1            15              D
  </pre>
  
  <p>And this is a standard scatterplot:</p>
  
  <pre>
  ggplot(a.df, aes(x=X.Attribute, y=Y.Attribute, size=Size.Attribute, fill=Colour.Attribute, label=Name)) +
     geom_point(shape=21) +
     geom_text(size=5, hjust=-0.2,vjust=0.2)
  </pre>
  
  <p>Is there a way to change it as follows?</p>
  
  <ul>
  <li>have scatterplot points labeled with numbers (1,2,3...) </li>
  <li>have a legend next to the plot assigning the plot labels (1,2,3...) to a.df$Name </li>
  </ul>
  
  <p>In the next step I would like to assign other attributes to the point size and color, which may rule out some 'hacks'.</p>