Re: [R] changes to y-axis labels in lmList intervals plot

About this list Date view Thread view Subject view Author view Attachment view

From: Deepayan Sarkar (deepayan@stat.wisc.edu)
Date: Sun 02 May 2004 - 08:29:37 EST


Message-id: <200405011729.37987.deepayan@stat.wisc.edu>

On Saturday 01 May 2004 17:08, William Dieterich wrote:
> Dear List,
>
> I am plotting lmList objects using plot(intervals()) in nlme
> package. I want to make changes to the y-axis labels. When I
> try to change cex of y-axis labels using the following:
>
> fm1 <- lmList(distance ~ age | Subject, Orthodont)
> plot(intervals(fm1), scales=list(y=list(cex = .7)))
>
> I receive: Error in bwplot(formula = group ~ intervals | what,
> data = structure(list( : formal argument "scales" matched by
> multiple actual arguments

As the error message suggests, the plot method supplies its own scales
argument, which conflicts with the one you give. The only way out that
I can think of (short of making changes to the plot method) is changing
the global settings:

> lset(list(axis.text = list(cex = .7)))
> plot(intervals(fm1))

Unfortunately, this would change the x-axis cex as well.

If you don't want to make the change globally, and you are using R
1.9.0, you could also do

> plot(intervals(fm1),
+ par.settings = list(axis.text = list(cex = .7)))

which has the effect of attaching the settings to the trellis object,
and using them for the duration of the plotting.

HTH,

Deepayan

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST