Kevin Zembower
2023-May-16 20:26 UTC
[R] [External Email] Newbie: Controlling legends in graphs
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