[R] pass longer arguments to adj of text()

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 20 21:43:56 CEST 2008


Why do you expect this to be vectorized when the help page clearly says 
otherwise?  See

      adj: one or two values in [0,1] which specify the x (and
           optionally y) adjustment of the labels.  On most devices
           values outside that interval will also work.

What is wrong with two or more text() calls?

NB: library(fortunes); fortune("WTFM") applies.


On Mon, 20 Oct 2008, Thomas Steiner wrote:

> Hi,
>
> text()'s pos does handle more dimensional labels, while adj does not -
> or how can I pass an array to text() and use the adj argument (skyblue
> text)?
>
> plot(-1:1,-1:1)
> text(c(0,0),c(0,0),c("a","b"),pos=c(1,2),col="red")
> text(c(0,0),c(0,0),c("a","b"),adj=cbind(c(1,2),c(1,1)),col="skyblue")
>
> Thomas

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list