data %>% ggplot() +
geom_hline(aes(yintercept=Trial, col=Participant2)) +
scale_color_discrete(name="NI-1", labels=c("False Alarm", "Hit", "Miss")) +
theme_minimal()
Is there a way to assign the following colors to the labels in the line of code above?
False alarm- red
Hit- white
Miss- blue.
Thank you!
We may use
scale_colour_manual()and assign custom colours and labels to the various levels of our discrete variable.Here I use data from
irisas example data andiris$Speciesas discrete variable.