[R] lattice plot problem!
Mulholland, Tom
Tom.Mulholland at dpi.wa.gov.au
Wed Apr 27 05:35:30 CEST 2005
Lattice is not my forte but here goes.
?panel.bwplot specifically notes that "pch, col, cex: graphical parameters controlling the dot". If you look at the code for panel.bwplot you will see where the colours come from in which case you can probably set up your own colour scheme using trellis.par.set.
If you are trying to change the symbol so that it is a small line that can be done using the pch parameter, however it sounds as if you are wanting to substitute the symbol for a line in which case you might have to write your own function. a good starting point would be the existing function. A quick look suggests to me that all you would have to do is to replace the stats$stats[3] code from grid.points to grid.lines.
Tom
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ivy_Li
> Sent: Wednesday, 27 April 2005 10:53 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] lattice plot problem!
>
>
> 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")
>
> 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.
>
> Could anyone help me to settle these problems?
> Thanks very much!
>
> Best Regards!
> Ivy Li£¨Àîè¡£©
> YMS in Production & Testing
> Semiconductor Manufactory International(ShangHai) Corporation
> #18 ZhangJiang Road, PuDong New Area, Shanghai, China
> Tel: 021-5080-2000 *11754
> Email: Ivy_Li at smics.com
>
> ______________________________________________
> 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
More information about the R-help
mailing list