On Tue, 22 Jul 2008, S Ellison wrote:

?text says
   "'adj' allows _adj_ustment of the text with respect to '(x,y)'.
    Values of 0, 0.5, and 1 specify left/bottom, middle and

But it looks like 0, 1 specify top, bottom respectively in the y

text(2,2, "adj=c(0,0)", adj=c(0,0))
text(2,2, "adj=c(0,1)", adj=c(0,1), col=2) #the red one's below the
black one...

If that comment is what you see (and I do on X11), it is as documented. In the first text() call the left bottom of the text box is at the specified point. In the second text() call the left top of the text box is at the specified point, so the text box should be lower.

#x-adj is OK
text(3,3, "adj=c(0,0)", adj=c(0,0))
text(3,3, "adj=c(1,0)", adj=c(1,0), col=2)

[I am using r 2.7.1 in windows; adj behaviour is consistent in 2.6.0ff
and for expressions as well as text]

All 'vertical' adjustment is done in the graphics engine: some 'horizontal' adjustment is done in the devices.

Perhaps a two-word correction to ?text ?

'adjustment' is not well-defined for text position, whereas 'alignment' or 'justification' are, so I suggest adding one of those before 'respectively'.

Steve Ellison
Lab of the Government Chemist

This email and any attachments are confidential. Any use...{{dropped:8}}

R-devel@r-project.org mailing list

Brian D. Ripley,                  [EMAIL PROTECTED]
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

R-devel@r-project.org mailing list

Reply via email to