How to create a legend for ggplot

Just an FYI for the future: be careful posting copy-pasted fancy stuff like tables via e-mail. They tend to come through really garbled in the forum — for instance, your nice pretty table wound up looking like this on the site itself:

Not so easy to read! The only reliable way to post formatting on this forum is to use Markdown syntax. You can read more about that here: FAQ: How to format your code