[R] bwplot panels like stripplot

Deepayan Sarkar deepayan at stat.wisc.edu
Fri Sep 24 19:49:43 CEST 2004



On Friday 24 September 2004 11:42, Waichler, Scott R wrote:
> I would like to plot horizontal box-and-whisker plots in lattice where
> each
> factor has its own panel and scales are "free."  Below is a stripplot
> version
> of what I have in mind.  Substituting "bwplot" doesn't work.  I know
> it's gotta
> be simple but I can't find the way . . .
>
> x <- c(runif(100, 0, 1), runif(100, 1, 2), runif(100, 2, 3))
> y <- c(rep("First", 100), rep("Second", 100), rep("Third", 100))
> stripplot(x | y,
>             layout=c(1,3),
>             scales=list(relation="free"),
>             as.table=T,
>             bg="white"
>   )

This won't work (easily) with R <= 1.9.1. Try with 2.0.0 beta, and let us know 
if you still have problems.

Deepayan




More information about the R-help mailing list