[Rd] mtext adj= wrong with several las= (PR#7188)

joehl at gmx.de joehl at gmx.de
Thu Aug 26 16:42:46 CEST 2004

Hi Uwe,

Thanks for your mail.

I see it different: yes, Left / right adjustemnt seems to be perfectly OK.
But at axis 1 with las=1, it's not Left / right adjustement what is needed
here. Here the text needs to be right adjusted, and the (one) adj= par
should determine the vertical alignment. It is a bit confusing, but for
mtext, the distance to the axis is done via line= and adj= moves ALONG the
axis, whatever las= says. 

I agree that it would be more flexible and logical to also have the 2
element form of adj=c(horizontal, vertical) here, but I fear that this
creates a lot of incompatibilities with existing code and with S+.



> Left / right adjustemnt seems to be perfectly OK.
> The thing that matters is centering "several lines" to the specified 
> ("at=") location.
> In fact, mtext() is not centering but bottom-aligning by adding a 
> negative distance that looks OK for one line in the default font size, 
> but not in most other cases.
> Hence this is the same as Paul Murrell's PR#1659 ("mtext() alignment of 
> perpendicular text"). Fixing this, and/or improving mtext()'s "adj" 
> argument to accept 2 dimensions is desirable, but might be not that 
> easy... I'll take a look during the next days, but nothing promised.


More information about the R-devel mailing list