I would like to change the colour of a specific point in a dataframe, note that I am not plotting the condition.
library(ggplot2)
colpf <- c(0,0,0,1,1,1,2,2,2)
coldf <- c(0,1,2,0,1,2,0,1,2)
x <- seq(0,8,1)
y <- seq(0,8,1)
df <- data.frame(colpf,coldf,x,y)
ggplot(data = df) +
geom_point(aes(x=x,y = y))
I would like to make the point which corresponds to colpf = 1 and coldf=1, say, red. In this case I believe it would be the point (4,4). I believe this will have a simple solution however my mind cannot seem to grasp it. Thank you.