Friday, December 7, 2012
draw a fig with R
> calpoints <- locator(n=4,type='p',pch=16,col='white',lwd=0.1)
> calpoints
$x
[1] 1.405103 2.325401 2.007167 2.927466
$y
[1] 1.9251696 1.9184308 -0.7501436 -0.7366660
> postscript(file="plot.eps", onefile=FALSE, horizontal=FALSE)
> setEPS("/Users/lilei/Desktop")
> postscript(file="aa.eps", onefile=FALSE, horizontal=FALSE)
> boxplot(golub[1042,] ~ gol.fac, xlim = c(0,5))
> arrows(1.405103,1.925169,2.325401,1.9184308,angle=30,code=1,col="red")
> arrows(2.007167,-0.7501436,2.927466,-0.7366660,angle=30,code=1,col="red")
> text(3.0,1.9184308,"Median")
> text(3.3,-0.7366660,"Outlier")
> dev.off()
par(mfrow=c(2,1)) divided the paper into 2 rows and one collums
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment