Dear Group: I want to use lattice with a formula such as y ~ x | v to plot a data frame in which v varies to indicate which "x" is really being plotted. I know how to make the x-axis scales vary with the panel but is it possible to let the x-axis label vary, i.e., to let the user specify a vector of x-axis labels? Thanks Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
Hi Frank May I suggest 1. ?strip.custom and get into strip.default for options 2. use the features of strip and modify to suit your requirements http://finzi.psych.upenn.edu/R/Rhelp02/archive/104004.html http://finzi.psych.upenn.edu/R/Rhelp02/archive/100977.html Regards Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: Home mackay@northnet.com.au At 23:30 11/08/2009, you wrote:>Dear Group: > >I want to use lattice with a formula such as y ~ x | v to plot a data >frame in which v varies to indicate which "x" is really being plotted. I >know how to make the x-axis scales vary with the panel but is it possible >to let the x-axis label vary, i.e., to let the user specify a vector of >x-axis labels? > >Thanks >Frank >-- >Frank E Harrell Jr Professor and Chair School of Medicine > Department of Biostatistics Vanderbilt University > >______________________________________________ >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. >[[alternative HTML version deleted]]
On Tue, Aug 11, 2009 at 6:30 AM, Frank E Harrell Jr<f.harrell at vanderbilt.edu> wrote:> Dear Group: > > I want to use lattice with a formula such as y ~ x | v to plot a data frame > in which v varies to indicate which "x" is really being plotted. I know how > to make the x-axis scales vary with the panel but is it possible to let the > x-axis label vary, i.e., to let the user specify a vector of x-axis labels?'xlab' can be a vector, but this is mostly useful for column-specific (not panel-specific) labels; e.g., densityplot(~Sepal.Length + Sepal.Width, data = iris, groups = Species, strip = FALSE, layout = c(2, 1), xlab = c("Sepal.Length", "Sepal.Width")) Does that help? Otherwise using strips as Duncan suggested is the only simple solution. -Deepayan