Skip to content

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

2 messages · Jens Oehlschlägel, Uwe Ligges

#
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+.

Best


Jens
--
#
joehl@gmx.de wrote:
I don't think so. Things are perfectly clear for the user if adj 
controls adjustment in reading direction independently from the las 
setting - and a second value specifying perpendicular adjustment.


 > It is a bit confusing, but for
No, adj moves not always along the axis:

plot(1:10)
mtext("Hello", 3, at=5, adj=0, col="red")
mtext("Hello", 3, at=5, adj=1, col="green")
mtext("Hello", 3, at=5, adj=0, col="red", las = 2)
mtext("Hello", 3, at=5, adj=1, col="green", las = 2)
My suggestion was different: using a new argument padj to be more flexible.

Uwe Ligges