[R] Layout() coordinates and drawing lines / segments

maria at meteo.mcgill.ca maria at meteo.mcgill.ca
Thu Jun 26 19:55:11 CEST 2008


I am trying to wrap my head around the coordinates systems associated with
the layout() function ...with the end goal of simply drawing a decorative
line in the upper margin of my figure, which is composed of three plots.

My output is defined as this:

     postscript("out.ps", horizontal=FALSE,
     +width=7.5,height=11.5,pointsize=10, paper = "special" )

     opar <- par(omi=c(0.1,0.1,0.1,0.1))

     layout_mat = matrix(c(1,2,3),nrow=3,ncol=1,byrow=TRUE)
     my_layout <-


2 Questions:
How do i find what are the x,y's of the upper margin ?
(I've heard of locator() but i don't think i can use it here as i have an
output file)

And, also, am i allowed to draw lines using segments() or lines() in the
margin regions -- defined by omi, oma -- of my figure, or are those
functions confined to plot regions ?

Thank You a lot,

More information about the R-help mailing list