Re: [R] Lattice plots and missing x-axis labels on second page
I should say I'm using Windows-7, R version 2.13.0 and lattice version 0.19-33. I've pared down my code to this : pdat = read.table("RGRAPHSDGE.csv",header=T,sep=",",fill=T) print(xyplot(pdat$NITRATE~pdat$DATEYR|pdat$WELL, as.table=TRUE, layout=c(3,4), xlab="Year", ylab="Nitrate mg / litre", strip=FALSE )) First 3 lines of pdat looks like this: WELL DATEYR NITRATE 1 ALASKA CHILDRENS SERVICES 1993.8360.81 2 ALASKA CHILDRENS SERVICES 1994.8500.91 3 ALASKA CHILDRENS SERVICES 1995.8030.94 Thanks again. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Evans, David G (DFG) Sent: Wednesday, November 02, 2011 3:24 PM To: r-help@r-project.org Subject: [R] Lattice plots and missing x-axis labels on second page Hello, I'm trying to make a lattice plot (using xyplot()). I have included a "layout=c(3,4)" statement, giving me 12 plots per page and an "as.table=TRUE" statement, directing the way the plots are laid out. I have 18 plots altogether and so 6 of them end up on the second page. Everything looks fine for the first page, but the x-axis labels (e.g. 1993, 1994...) are all missing on the second page. The x-axis variable name ("Year") is there at the bottom, however. Any help is appreciated. Thanks. David G. Evans Biometrician Division of Sport Fish Alaska Dept . of Fish and Game Anchorage, Ak 99518 __ 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.
[R] Lattice plots and missing x-axis labels on second page
Hello, I'm trying to make a lattice plot (using xyplot()). I have included a "layout=c(3,4)" statement, giving me 12 plots per page and an "as.table=TRUE" statement, directing the way the plots are laid out. I have 18 plots altogether and so 6 of them end up on the second page. Everything looks fine for the first page, but the x-axis labels (e.g. 1993, 1994...) are all missing on the second page. The x-axis variable name ("Year") is there at the bottom, however. Any help is appreciated. Thanks. David G. Evans Biometrician Division of Sport Fish Alaska Dept . of Fish and Game Anchorage, Ak 99518 __ 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] lattice histogram and grouping
Hi, >From the following pseudo-code (tweaked from another user): library(lattice) variable<-sample(rep(1:2,100)) individual<-rep(1:3, length(variable)) group<-rep(LETTERS[1:2],length(variable)/2) mydata<-data.frame(variable,individual,group) individual<-as.factor(individual) group<-as.factor(group) histogram(~variable|individual+group) I get six panels, one for each of individuals 1-3 in group A and one for each of individuals 1-3 in group B . What I want is three panels, one for each individual, but with A and B paired in the same panel. I think the "groups="argument does this sort of superposition for other lattice functions, but is apparently unavailable for histogram(). Thanks very much for any help. __ 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] lattice histogram function and groups
Hi, >From the following code (tweaked from another user): variable<-sample(rep(1:2,100)) individual<-rep(1:3, length(variable)) group<-rep(LETTERS[1:2],length(variable)/2) mydata<-data.frame(variable,individual,group) individual<-as.factor(individual) group<-as.factor(group) histogram(~variable|individual+group) I get six panels, one for each of individuals 1-3 in group A and one for each of individuals 1-3 in group B . What I want is three panels , one for each individual, but with A and B paired in the same panel. I think the "groups="argument does this sort of superposition for other lattice functions. Thanks very much for any help. [[alternative HTML version deleted]] __ 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.