R 标记散点图的特定点
我想绘制一个散点图,其中只包含符合我的条件的特定标签 我有一个数据帧df,看起来像R 标记散点图的特定点,r,R,我想绘制一个散点图,其中只包含符合我的条件的特定标签 我有一个数据帧df,看起来像 In.Deg `Out.Deg Name 34 38 ABC 56 45 Dummy 53 54 Another_Dummy 我只希望在绘图中标记符合In.Deg>50和Out.Deg>50标准的值 我只想显示另一个_假人。我不希望其他名称在打印时显示为标签 谢谢你的帮助 ## read in your da
In.Deg `Out.Deg Name
34 38 ABC
56 45 Dummy
53 54 Another_Dummy
我只希望在绘图中标记符合In.Deg>50和Out.Deg>50标准的值
我只想显示另一个_假人。我不希望其他名称在打印时显示为标签
谢谢你的帮助
## read in your data
d <- read.table(header = TRUE, text = "In.Deg Out.Deg Name
34 38 ABC
56 45 Dummy
53 54 Another_Dummy ")
## subset and plot with label
s <- subset(d, In.Deg > 50 & Out.Deg > 50)
with(d, plot(In.Deg, Out.Deg))
text(s[,1:2], labels = s[,3], pos = 1)