Hi Dennis - thanks a lot - I do not seem to make any progress from reading the pages in the lattice book or the documentation of the doubleYScale function.
All best wishes
Troels


Den 05-08-2014 20:49, Dennis Murphy skrev:
Hi:

This *partially* works, although I don't see why it shouldn't work completely:

update(sd,
    par.settings = list(axis.text = list(cex = 1.2),
                        par.ylab.text = list(cex = 1.5)))

It fixes the y-axis text sizes, but it doesn't fix the size of the
Y-variable names. See pp. 125-126 of the Lattice book for a
description.

Dennis

On Tue, Aug 5, 2014 at 10:22 AM, Troels Ring <tr...@gvdnet.dk> wrote:
Dear friends - below is a small example showing a problem I have
understanding doubleYScale from latticeExtra -
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

Both obj1 and obj2 are formatted as I wanted - but when combined the
formatting is lost. How comes?
Best wishes
Troels Ring
Aalborg, Denmark

library(latticeExtra)
T <- seq(1,200,length=100)
Y1 <- 10+2*T+0.05*T^2 + rnorm(100,0,40)
Y2 <- 0.1 + sqrt(T)+rnorm(100,1,1)
tesobj <- data.frame(T=T,Y1=Y1,Y2=Y2)


obj1 <-
xyplot(Y1~T,tesobj,xlab=list(label="Time",cex=1.5),ylab=list(label="Y1",
cex=1.5),scales=list(y=list(cex=1.2),x=list(cex=1.2)),
panel = function(x,y,...){
panel.xyplot(x,y,...,pch=19)
panel.loess(x,y,...,lwd=3)
})
obj1

obj2 <-
xyplot(Y2~T,tesobj,xlab=list(label="Time",cex=1.5),ylab=list(label="Y2",
cex=1.5),scales=list(y=list(cex=1.2),x=list(cex=1.2)),
panel = function(x,y,...){
panel.xyplot(x,y,...,pch=20)
panel.loess(x,y,...,lwd=3)})
obj2

(sd <- doubleYScale(obj1,obj2,add.ylab2=TRUE))

______________________________________________
R-help@r-project.org mailing list
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.

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to