我试图在散点图中标记我的所有点,其中包含与变量关联的国家/地区的名称,但所有标签都向下移动。这不是正确的方法:
plot(jitter(data$variable1,2), jitter(data$variable2,2), main = "Bivariate relationship between variable1 and variable2", xlim = c(0,100), ylim = c(0,100), xlab = "Variable 1", ylab = "Variable 2", col = "red", pch = 15)
text(jitter(data$variable1,2), jitter(data$variable2,2), labels = data$Country)
This is what the scatterplot looks like without labels 我们的数据集是这样的:
Country Variable1 Variable2
France 2 2
Turkey 1 3
答案 0 :(得分:0)