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

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Fri, 27 Jun 2008 07:51:27 +1200

Hi

Take a look at ...

http://www.stat.auckland.ac.nz/~paul/R/basegraphics.pdf

... it's getting old, but a lot of what it says should still hold, especially the stuff about coordinate systems and what you can draw where.

Paul

maria_at_meteo.mcgill.ca wrote:
> Hello,
>
> 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 <-
> layout(layout_mat,widths=c(1,1,1),heights=c(1,1.5,1.5),respect=FALSE)
>
> -----------------------------------------------------------------------------
>
> 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,
> maria
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul_at_stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 26 Jun 2008 - 19:56:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 26 Jun 2008 - 20:32:48 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive