thanks again walmes. but the new problem would be that not all of the peaks
are the same intensity. therefore the top five datapoints from my highest
peak have greater intensity values than the highest point in the
second-highest peak.
but this is once again helpful. i found that there is a libra
You can set the number of extreme points to be labeled instead of define a
cutoff. Look:
da <- data.frame(y=rnorm(50), x=1:50)
plot(y~x, data=da)
abline(h=c(-2,2), lty=3)
with(da, text(x[abs(y)>2], y[abs(y)>2], label=x[abs(y)>2], pos=2))
da <- da[order(da$y),]
plot(y~x, data=da)
# five small and
Thanks Walmes,
that does indeed work well for labeling all points greater than some
specified value. But the problem is that while my peaks are very sharp there
is more than one point along the line as it slopes up. This method will
label those points as well , making the data look cluttered. Ide
You can adapt the following example
da <- data.frame(y=rnorm(50), x=1:50)
plot(y~x, data=da)
abline(h=c(-2,2), lty=3)
with(da, text(x[abs(y)>2], y[abs(y)>2], label=x[abs(y)>2], pos=2))
Walmes.
-
..ooo0
.
4 matches
Mail list logo