[R] [External Email] Newbie: Controlling legends in graphs
Kevin Zembower
kev|n @end|ng |rom zembower@org
Tue May 16 22:26:51 CEST 2023
See below.
On 5/16/23 10:52, Christopher Ryan wrote:
> I"m more of a lattice guy than a ggplot guy, but perhaps this is part of
> the problem:
>
> .....
> geom_point(aes(y = m_K, color = "red")) + ##### >> you've
> associated "K" with the color red
> geom_smooth(aes(y = m_K, color = "red")) +
> geom_point(aes(y = m_J, color = "blue")) + ###### >> and "J"
> with the color blue
> geom_smooth(aes(y = m_J, color = "blue")) +
>
> .....
>
Yes, I was confused that I associated "K" with the color red, yet the
line and points for K's data were blue, but in the legend, was labeled
with the word "red".
But, I think I've got it straightened out now. Thanks for your help.
-Kevin
More information about the R-help
mailing list