[R] bwplot and outlier symbols

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Tue Mar 14 19:09:53 CET 2006


Hi, Vincent,

You need to add

par.settings = list(plot.symbol = list(pch = 2, col = "blue", cex = 2))

to your "bwplot" call. Just change the values for "pch", "col", "cex", 
etc. to suit your needs. The "plot.symbol" setting determines the symbol 
for the outliers. As Deepayan noted, it's not documented in 
panel.bwplot, but looking at the code for panel.bwplot reveals the solution.

To see all the settings in use, try the following:

show.settings()

or to see a particular one, try:

trellis.par.get("plot.symbol")

See also, ?trellis.par.get and ?bwplot (where "par.settings" is documented).

HTH,

--sundar


vincent david wrote:
> Hello again,
> 
> I'm still confused how this is supposed to work. Especially the symbol for
> the outliers still puzzle me. This is what I do:
> 
> bwplot (points ~ general[,1] | groups,
>         layout = c(1, 3),
>         scales = list(x = list(at = seq(10, 100, by=5), labels=seq(10, 100,
> by=5), tck=c(1,0))),
>         panel=function(x,y) {
>            panel.bwplot(x,y, horizontal=FALSE, pch="-", outlty=1, outpch=NA)
>            },
>         horizontal=FALSE)
> 
> The symbol for the outliers don't get changed wheras the "pch"  changes the
> symbol for the median. Which parameter changes the outliers?
> 
> cheers
> 
> Vincent
> 
> On 3/14/06, Sundar Dorai-Raj <sundar.dorai-raj at pdf.com> wrote:
> 
>>
>>
>>vincent david wrote:
>>
>>>Hi,
>>>
>>>I was just trying to figure out how to beautify the output of my
>>>bwplot-output. Altogether I figured most of the things out on my own.
>>
>>The
>>
>>>one thing which puzzles me though are the symbols for the outliers.
>>>
>>>I can easily change the form of the median symbol by using "pch"  but I
>>>don't know how to do this for outliers. Obviously the "outpch" of the
>>>"bxp"-function is not implemented.
>>>
>>>Any clue how to do this? Any documentation reference at hand?
>>>
>>>cheers
>>>
>>>Vincent
>>>
>>
>>Hi, Vincent,
>>
>>You need to change the setting for "plot.symbol".
>>
>>trellis.par.set(theme = col.whitebg()) # not required, but my preference
>>bwplot(voice.part ~ height, data = singer, xlab = "Height (inches)",
>>        par.settings = list(plot.symbol = list(pch = 2, col = "blue")))
>>
>>I'm not sure where this is documented. I figured it out by reading the
>>code for "panel.bwplot" which shows the settings used to plot the
>>outlier symbols.
>>
>>HTH,
>>
>>--sundar
>>
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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