[R] (x,y) coordinates for grid.text()

hadley wickham h.wickham at gmail.com
Tue Mar 4 18:19:55 CET 2008


On Tue, Mar 4, 2008 at 11:18 AM, hadley wickham <h.wickham at gmail.com> wrote:
> >  When using grid.text it seems my supplied (x,y) coordinates are being
>  >  plotted only in npc (normalized parent coordinates) where (.5,.5) is the
>  >  center of the graph.  How do I allow (x,y) to be coordinates corresponding
>  >  to the (x,y) values in the graph?   The examples in ?grid.text seem to do
>  >  this.  (I think the problem lies in how x and y are defined with respect to
>  >  unit ).   Any help much appreciated.  Sample code below.
>
>  Have you read the documentation for grid.text?  You need to read the
>  description of the default.units argument and then read ?unit.

Oh, and since you're drawing on top of a lattice plot, you'll also
need to read ?trellis.focus

Hadley


-- 
http://had.co.nz/



More information about the R-help mailing list