[Rd] mtext adj= wrong with several las= (PR#7188)
"Jens Oehlschlägel"
joehl at gmx.de
Thu Aug 26 20:48:01 CEST 2004
> No, adj moves not always along the axis:
No, not yet. But mtext logically is oriented relative to its axis. And it
should behave consistently relative to its axis.
Whichever solution is choosen finally, I think it is important, that the
default parametrisation will handle multi-line labels such that they are
centered around at= and aligned at line=, whatever side= and las= are
choosen. Beeing forced to tweak with adj= / padj= depending on side= / las=
would be very impractical. This "requirement" is easily fullfilled with
default adj=0.5 if we have mtext's adj= always move along the axis. With a
adj= / padj= solution, different defaults would be needed for the different
combinations of side= and las=.
How does it S+?
Best
Jens
# Thats my problem
txt <- "This are\nfour lines\nof some\nrubish"
y <- barplot(x, axes=FALSE, axisnames=FALSE, horiz=TRUE)
# axis doesn't align it properly
axis(2, label=rep(txt, 5), at=y, las=2, adj=0)
# and no mtext parameters give vertically centered and right adjusted text
mtext(rep(txt, 5), side=2, line=1, at=y, las=2, adj=0)
--
Supergünstige DSL-Tarife + WLAN-Router für 0,- EUR*
Jetzt zu GMX wechseln und sparen http://www.gmx.net/de/go/dsl
More information about the R-devel
mailing list