Troubleshooting legends in ggplot2