我正在尝试用我的数据字段中的另一列标记ECDF图的点。目前我使用的是:
untouched = read.table("results-untouched.tsv", sep="\t")
plot.ecdf(untouched$V4, xlim=c(0.75,1.25), ylim=c(0,1), col='green', verticals=T)可以绘制,但是我无法将标签添加到点上。标签应该是untouched$V1格式的。
你知道该怎么做吗?
发布于 2012-03-19 18:31:22
要添加标签,可以使用text函数。例如,我们生成一些数据
x = sort(rnorm(10))然后创建ecdf对象(plot.ecdf会自动执行此操作),
m = ecdf(x)和plot m
plot(m)要添加标签,我们使用text函数。X坐标是数据,y坐标是ecdf函数的输出(额外增加0.03以避免重叠绘制):
text(x, m(x) + 0.03, LETTERS[1:10])https://stackoverflow.com/questions/9768161
复制相似问题