在散点图中标记特定点

时间:2021-06-30 21:00:39

标签: r plot scatter-plot labeling

我有一个 1149 行 6 列的数据框。我用 x 轴上的 protein number 列和 y 轴上的 iBAQ score 列绘制了一个图。现在,我想为一些感兴趣的蛋白质的散点图添加标签,蛋白质编号:3、5、10、20、43、72、151。 我的散点图代码如下所示:

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),)

它给出了下图 scatterplot

感兴趣的蛋白质在图片中显示为红色。 如何为感兴趣的蛋白质添加标签?

0 个答案:

没有答案