bwplot and outlier symbols

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

bwplot and outlier symbols

vincent david
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

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

bwplot and outlier symbols

vincent david
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

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

Sundar Dorai-Raj


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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

Deepayan Sarkar
On 3/14/06, Sundar Dorai-Raj <[hidden email]> 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.

Should have been (but isn't) documented in ?panel.bwplot. I'll add a note.

Deepayan

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

vincent david
In reply to this post by Sundar Dorai-Raj
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 <[hidden email]> 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]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

Sundar Dorai-Raj
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 <[hidden email]> 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]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

vincent david
Hi,

that was it! I managed to set me parameters properly using:

trellis.par.set(...

What I still not quite understand though is how to use:

par.settings = ...

I cant use it in the bwplot-command itself - this throws a error. Whereas
using it in a:

panel = function (...){...

enviroment doesn't change anything!?

thanks again

Vincent

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: bwplot and outlier symbols

Sundar Dorai-Raj


vincent david wrote:

> Hi,
>
> that was it! I managed to set me parameters properly using:
>
> trellis.par.set(...
>
> What I still not quite understand though is how to use:
>
> par.settings = ...
>
> I cant use it in the bwplot-command itself - this throws a error.

What error? What version of R/lattice are you using?

 > R.version.string
[1] "R version 2.2.1, 2005-12-20"
 > packageDescription("lattice")$Version
[1] "0.12-11"
 > .Platform$OS.type
[1] "windows"

--sundar


> Whereas using it in a:
>
> panel = function (...){...
>
> enviroment doesn't change anything!?
>
> thanks again
>
> Vincent

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html