[R] lattice plot problem!

Deepayan Sarkar deepayan at stat.wisc.edu
Wed Apr 27 15:21:11 CEST 2005


On Tuesday 26 April 2005 21:52, Ivy_Li wrote:
> Hello everybody,
>  Could I consult you two questions?
>  Recently I write some code about lattice plot.
> 1) bwplot function
>  I know the lattice default background color is grey and the box
> color is green, but I don't like the color. So I change the
> background color to white use the
>
> > trellis.device(bg="white")

That doesn't (and is not intended to) change the lattice background 
color to white. If it does, you are using an old version of R, please 
consider upgrading. In recent versions, the help page for 
trellis.device discusses this issue in some detail. Most of the 
commentary applies to earlier versions as well; if you are unwilling to 
upgrade R, you can still read it at

http://cran.r-project.org/doc/packages/lattice.pdf

>  then I modify the
>
> > panel=function(...)
>
> +{
> + panel.bwplot(col="black"...)
> + }
>
>  But I find the the box color is still green, just change the color
> of point which is in the box, I guss it is the mean or median value
> of the data. So How to change the color of box, and how to change the
> shape of the point in the box. I want it like other boxplot, like a
> horizontal line.
>
> 2) In every lattices, I want to add a mean line of the group. I try
> the
>
> >panel.abline(h)
>
>  But I find in very lattice add the same line. Then I try the
> "panel.linejoin" etc. But I can not get my wish plot.

Tom Mulholland has already responded to this part.

Deepayan




More information about the R-help mailing list