[R] add cex.axis =1.2 to qqunif.plot from lattice library
Rolf Turner
r@turner @end|ng |rom @uck|@nd@@c@nz
Sat Mar 27 23:57:59 CET 2021
On Sat, 27 Mar 2021 21:26:53 +0000
Yuan Chun Ding <ycding using coh.org> wrote:
> Dear R user,
>
> The following qqunit.plot function generated correct qq plot,
> however, I want to make axis label (1 ,2 ,.....8) have larger size
> for publication. I tried to add cex.axis =1.2 code following the pch
> =20, but it does not change size of axis label. I guess lattice
> library setting is different from standard R graphics setting.
Yes indeed things are different. Read e.g. the help for xyplot() --- a bit
opaque until you get used to it, but the information actually *is* there.
Your example is *far* too complicated for anyone to wade through,
but here is a toy example just using xyplot:
set.seed(42)
x <- 1:10
y <- rnorm(10)
library(lattice)
# Compare:
print(xyplot(y ~ x))
# with:
print(xyplot(y ~ x,scales=list(cex=2)))
To get an overall title you can use "main=", just like in base graphics.
E.g.:
print(xyplot(y ~ x,scales=list(cex=2),
main="This is a load of dingoes' kidneys."))
If you can't get something like this to work in the context
in which you are interested, then please provide a *minimal* (simple!)
reproducible example illustrating the problem, and someone on this list
will probably be able to help you.
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-help
mailing list