[R] persp3D: Adjusting labels other than centered?
Helmut Schütz
helmut.schuetz at bebac.at
Mon Dec 21 16:25:01 CET 2015
Dear all,
for a publication I have to change cex.axis and cex.lab. I'm already
using Paul Murrell's workaround to increase the distance of the axes'
titles by adding "\n". However, I found no method to either increase the
distance of the labels or set their justification (by adj or hadj). They
are centered (adj 0.5), which may lead to overlapping. Example:
x <- seq(-10, 10, length = 100)
y <- x
f <- function(x,y) { r <- sqrt(x^2+y^2); 0.1*sin(r)/r }
z <- outer(x, y, f)
library(plot3D)
persp3D(x = x, y = y, z = z, ticktype = "detailed",
colkey = FALSE, cex.lab = 2, cex.axis = 1.5,
xlab = "\nmy x", ylab = "\nmy y", zlab = "\n\nmy z")
?persp mentions hadj only for the colkey-argument
?perspbox tells me that other arguments can be passed to persp
There I find that additional parameters might be set in par. However,
adj seems to be valid only for text, mtext and title (not for labels in
axis).
Now I'm stuck. Is there a method to(1) pass an argument to adjust text
and (2) if yes, can it be set independently for the three axes?
In my example centered for x and y is fine, but for z I would liketo
have the labels right-justified.
I was thinking about writing the labels by text3D (and format them by
sprintf), but then I'm facing another collision. In order to prevent the
default-labels to be displayed I have to switch to ticktype="simple".
Then I (1) loose the ticks and (2) get the arrows which I don't want.
THX in advance,
Helmut
Environment: x86_64-w64-mingw32/x64 (64-bit), R 3.2.2, plot3D 1.0-2
--
Ing. Helmut Schütz
BEBAC - Consultancy Services for
Bioequivalence and Bioavailability Studies
Neubaugasse 36/11
1070 Vienna, Austria
VAT No ATU61115625
DUNS 300370568
tel +43 1 2311746
mobile +43 699 10792458
e-mail helmut.schuetz at bebac.at
web http://bebac.at/
contact http://bebac.at/Contact.htm
forum http://forum.bebac.at/
This e-mail is confidential and may also be legally privileged. If you
are not the intended recipient please reply to sender, do not disclose
its contents to any person and delete the e-mail. Any unauthorized
review, use, disclosure, copying or distribution is strictly prohibited.
[[alternative HTML version deleted]]
More information about the R-help
mailing list