How to code the response variable into a scatter plot in R

r
plot

#1

hello.

In the above image in the scatter plot the response variable has been coded into the plot so that the data points are colored differently for default/non-default.

I want to know how can I achieve the same in R


#2

Hi @hackers

you can use ggplot and set colour to you response valuable ,

example

ggplot(mydayta, aes(x=balanes, y= income, colour=response)) +geom_point() + --------

Alain