A scatterplot problem - solved


#1
scatter <- ggplot(examData, aes(Anxiety, Exam))
scatter + geom_point(aes(colour = Gender)) + geom_smooth(method = "lm")

If i execute the commands above, the graph shows up correctly with different color dots, however, if I follow my textbook and execute the commands below, I don’t see different color dots.

satter <- ggplot(examData, aes(Anxiety, Exam, colour = Gender))
scatter + geom_point() + geom_smooth(method = "lm")

Can anyone help me (a absolute beginner) understand what am I doing wrong?
Thank you.


#2

If you have figured out the answer your question, please post the code that worked as a separate post in the thread and mark it as correct rather than adding “solved” to your question title.


#3

Thank you for reminding me. :slight_smile:

scatter <- ggplot(examData, aes(Anxiety, Exam, colour = Gender))
scatter + geom_point() + geom_smooth(method = “lm”)

I found that I misspelled scatter as satter.


#4

As your question have a solution, can you mark your topic as solved then ?

Thank you.