[R] add cex.axis =1.2 to qqunif.plot from lattice library

Deepayan Sarkar deep@y@n@@@rk@r @end|ng |rom gm@||@com
Sun Mar 28 06:04:20 CEST 2021


In addition to what Rolf said, a relatively obscure but generally
useful way to "globally" control fontsize is to set the underlying
grid parameter (see ?grid::gpar). The easiest way to do this is
through the lattice settings, e.g.,

lattice.options(default.theme = list(grid.pars = list(cex = 1.5)))

This is particularly useful for high resolution PNG plots for
inclusion in HTML output via knitr.

-Deepayan

On Sun, Mar 28, 2021 at 4:28 AM Rolf Turner <r.turner using auckland.ac.nz> wrote:
>
>
> 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
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list