I have a data frame with 1149 rows and 6 columns. I made a plot with the columns protein number
on the x-axis and iBAQ score
on the y-axis. Now, I want to add labels to the scatterplot for a few proteins of interest, protein numbers: 3, 5, 10, 20, 43, 72, 151.
My scatterplot code looks like this:
plot <- plot(Protein_number, iBAQ_score, xlab = "Proteins", ylab = "iBAQ score",
main = 'Ccrosslinking on beads', abline(h=79961000, lwd=1, lty=2, col='green'),
col=ifelse(Protein_number%in%Proteins_interest, 'red', 'black'),
pch=ifelse(Protein_number%in%Proteins_interest, 19, 1),
cex=ifelse(Protein_number%in%Proteins_interest, 1.2, 1),)
and it gives the following figure scatterplot
The proteins of interest are colored red in the picture. How can I add labels to my proteins of interest?