# Marking not all points on the graph

This is my code:

```
A<-read.delim("/Users/macbookair11/Downloads/file.txt",header = T)
names(A)
attach(A)
P<--log10(fdr)
plot(lfc,P,type="p",
xlab="log2fc",
ylab="-log10fdr",
pch=16,
xlim=c(-5,5)
)
abline(h =(-log10(0.01)), untf = FALSE, col="red")
abline(v =(log2(2)), untf = FALSE, col="red")
abline(v =-(log2(2)), untf = FALSE, col="red")
text(lfc,P, labels=Transcript, cex=0.6, pos=4, col="red")
```

I do not need to label all the points, but only those that have y> 2 and (x <-1 or x> 1) How can I change my script to make it work correctly? Thanks to

-1

source to share

1 answer

There is no way to show you how to do this with your data as it is not available; it shows some conditional labeling of "outliers" from the t-test.

```
x <- rnorm(100)
y<- rchisq(100,1)
plot(x,y, xlim=c(-3.5,3.5))
abline(v= c(-1.96, 1.96), col='red')
abline(h= 3.84, col='red')
text(x[ abs(x) > 2|y > 3.8], y[abs(x) > 2|y > 3.8]+.15,
paste0("(",round(x[ abs(x) > 2|y > 3.8],1), " , ",
round(y[ abs(x) > 2|y > 3.8],1),
")" ) )
```

0

source to share