Hello, I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. When using 'relation="free"', it does not make the scales 'free', however when using 'relation="sliced"', I get a warning "Explicitly specified limits ignored in: limitsFromLimitlist(have.lim = have.ylim, lim = ylim, relation = y.relation," (although in this particular case, I get the desired result, but in my real data, I do not get the free y-scale for each panel). Can you please let me know what should be correct syntax? Thanks. -Nitin library(Hmisc) test1 <- data.frame( y = c(rnorm(33), rnorm(33, mean=10), rnorm(34, mean=100)), x = 1:100, f = factor(c(rep("a", 33), rep("b", 33), rep("c", 34))), g = factor(sample(LETTERS[1:2], size=100, replace=TRUE)) ) CI <- rnorm(100) lb <- test1$y - CI ub <- test1$y + CI xYplot(Cbind(y, lb,ub )~x|f, groups=g, scales = list(relation="free"), ## Changing it to sliced gives warning data=test1) ____________________________________________________________________________________ Don't pick lemons.
Nitin Jain said the following on 5/30/2007 8:12 AM:> Hello, > > I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. > When using 'relation="free"', it does not make the scales 'free', however when using 'relation="sliced"', I get a warning "Explicitly specified limits ignored in: limitsFromLimitlist(have.lim = have.ylim, lim = ylim, relation = y.relation," (although in this particular case, I get the desired result, but in my real data, I do not get the free y-scale for each panel). Can you please let me know what should be correct syntax? > > Thanks. > -Nitin > > library(Hmisc) > > test1 <- data.frame( > y = c(rnorm(33), rnorm(33, mean=10), > rnorm(34, mean=100)), > x = 1:100, > f = factor(c(rep("a", 33), rep("b", 33), rep("c", 34))), > g = factor(sample(LETTERS[1:2], size=100, replace=TRUE)) > ) > > > CI <- rnorm(100) > lb <- test1$y - CI > ub <- test1$y + CI > > > xYplot(Cbind(y, lb,ub )~x|f, > groups=g, > scales = list(relation="free"), ## Changing it to sliced gives warning > data=test1) > >You want scales = list(y = list(relation = "free")) HTH, --sundar
You could consider doing this directly with lattice. See: demo(intervals) On 5/30/07, Nitin Jain <nj7w at yahoo.com> wrote:> Hello, > > I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below. > When using 'relation="free"', it does not make the scales 'free', however when using 'relation="sliced"', I get a warning "Explicitly specified limits ignored in: limitsFromLimitlist(have.lim = have.ylim, lim = ylim, relation = y.relation," (although in this particular case, I get the desired result, but in my real data, I do not get the free y-scale for each panel). Can you please let me know what should be correct syntax? > > Thanks. > -Nitin > > library(Hmisc) > > test1 <- data.frame( > y = c(rnorm(33), rnorm(33, mean=10), > rnorm(34, mean=100)), > x = 1:100, > f = factor(c(rep("a", 33), rep("b", 33), rep("c", 34))), > g = factor(sample(LETTERS[1:2], size=100, replace=TRUE)) > ) > > > CI <- rnorm(100) > lb <- test1$y - CI > ub <- test1$y + CI > > > xYplot(Cbind(y, lb,ub )~x|f, > groups=g, > scales = list(relation="free"), ## Changing it to sliced gives warning > data=test1) > > > > > > > > ____________________________________________________________________________________ > Don't pick lemons. > > ______________________________________________ > R-help at 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. >
Thanks Sundar and Gabor for your prompt help. Sundar - Even after changing the line to "scales = list(y = list(relation = "free"))", I do not get the free scales in my test code (below), and relation ="sliced" still gives warning. Gabor - I'll try using code as demo(intervals) suggests. Best, Nitin Nitin Jain said the following on 5/30/2007 8:12 AM:> Hello, > >I would like to get the scales of y-axes dependent only on the data points in a particular panel. Have attached a test example below.>When using 'relation="free"', it does not make the scales 'free', however when using 'relation="sliced"', I get a warning "Explicitly specified limits ignored in: limitsFromLimitlist(have.lim = have.ylim, lim = ylim, relation = y.relation," (although in this particular case, I get the desired result, but in my real data, I do not get the free y-scale for each panel). Can you please let me know what should be correct syntax?> > Thanks. > -Nitin > > library(Hmisc) > > test1 <- data.frame( > y = c(rnorm(33), rnorm(33, mean=10), > rnorm(34, mean=100)), > x = 1:100, > f = factor(c(rep("a", 33), rep("b", 33), rep("c", 34))), > g = factor(sample(LETTERS[1:2], size=100, replace=TRUE)) > ) > > > CI <- rnorm(100) > lb <- test1$y - CI > ub <- test1$y + CI > > > xYplot(Cbind(y, lb,ub )~x|f, > groups=g, > scales = list(relation="free"), ## Changing it to sliced gives warning > data=test1) > >You want HTH, --sundar ____________________________________________________________________________________Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.