[R] graphics: y limit on xyplot

From: Murray Pung <mcpung_at_gmail.com>
Date: Mon 11 Sep 2006 - 04:32:58 GMT


I would like to set the y axis limit of an xyplot using the object 'ylimit', but receive this error:
[1] 990
Error in extend.limits(limitlist[[i]], axs = axs) :

   improper length of lim

I get the same error if I use ylim.

library(lattice)
trellis.device(col = FALSE, theme = lattice.getOption("col.whitebg")) name <- "Variable name"
symbols <- c(1,2,3,4,5,6,7,8,9)
patientp <- c(1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9) varp <-
c(826,119,168,90,572,323,122,10,42,900,250,180,120,650,400,130,12,33) visitp <- c(1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3) yall <- c(varp,varl,varm,varh)
ylimit <- max(yall)*1.1
xyplot(varp ~ visitp,

            xlab = "Visit",
            ylab = name,
            group = patientp,
            type = "b",
            lty = 1,
            as.table = TRUE,
            main = list("Placebo",cex = 1.0),
            scales = list(relation = "free",x = list(tick.number = 1,at =
c(1,3)),y = list(limits = ylimit)),
            auto.key = list(space = "right",cex = 1.1),
            par.settings = list(superpose.symbol = list(pch = symbols,cex =
1.1)))
-- 
Murray Pung
Statistician, Datapharm Australia Pty Ltd
0404 273 283

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Wed Sep 13 14:18:06 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 13 Sep 2006 - 05:30:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.