S******y 发帖数: 1123 | 1 Does anybody know how to adding colors to data points in scatter plot in R?
I have the following R data frame -
Voter_Name, Education_years, Income, Registered
Ricky, 18, 40000, Y
Lisa, 20, 34000, N
Jon, 10, 35000, Y
...
I am doing a scatter plot in R for those data points - Income vs.
EducationYears.
I would also like to using different colors to differentiate whether that
data point is a Registered Voter or not.
Does anybody know how to adding colors to data points in scatter plot in R?
Thanks | k********e 发帖数: 448 | 2 ?plot
or ?points
or ?par |
|