Following is a csv file example, we will draw a Scatter Plot of the "Expression" and "Quality" values:
Let first read in the data from the file:
> x <- read.csv("scatterplot.csv",header=T,sep="\t")
> x <- t(x)
> ex <- as.numeric(x[2,1:ncol(x)])
> qu <- as.numeric(x[3,1:ncol(x)])
Draw a Scatter Plot:
> plot(ex,qu)
If we want to draw different subtype in different color and symbol, we need more work like follows:
> plot(ex,qu,col="white",xlab="Expression", ylab="Quality")
> points(ex[1:143],qu[1:143],col="red",pch=3,cex=.6) #Subtype A
> points(ex[144:218],qu[144:218],col="blue",pch=19,cex=.6) #Subtype B
> points(ex[219:ncol(x)],qu[219:ncol(x)],col="black",,pch=1,cex=.6) #Subtype C
> abline(lm(ex[144:218] ~ qu[144:218]),col="blue") #regression expression ~ quality of B