0

I was trying to write some simple script for generating the scatter plots in R.

Here is the code:

covData<-read.table("C:/Users/JasonShi/Desktop/all_new_graphs/average_BRCA1.summary",header=TRUE, sep="\t")
exon=covData[,1]
min=covData[,2]
plot(exon,min,main="My Table",las=2)
par(pch=15,col="green")

I just want to use pch to change the labels, but it didn't work out when I add it to plot like:

plot(exon,min,main="My Table",las=2,pch=15)

And this way doesn't work either...

It gives me dashes by default, and seems like I can't make any change to it.

Here is how my data look like(delimited by tab):

Sample_ID Number sample_1 6 sample_2 9 sample_3 123

and I wrote simple command as:

plot(cov~sample,pch=2,main="My Table",las=2,cex=2)

Is it the correct way of generating scatter plots? I have the problem of not able to change pch() value.

Thanks.

4

0 回答 0