Re: [R] bwplot

From: Deepayan Sarkar <>
Date: Mon, 05 May 2008 12:13:17 -0700

On 5/5/08, cfinet <> wrote:
> Hi,
> I have 2 questions about bwplot in R :
> 1) How to change the order of my different boxes in the graph ?
> 2) How to rename the names of the differents boxes ? because I know how to
> do that with boxplot (using names) but I do not find the equivalent
> parameter in bwplot.

Both the labels and the order are derived from levels(y), where y is the categorical variable in your boxplot. You can specify both when you create a factor explicitly; see ?factor. (Also see ?reorder.factor, although I doubt that's what you want).

You can also change the labels in the bwplot call using xlim or ylim; e.g.,

bwplot(voice.part ~ height, data=singer, ylim =[1:8])

-Deepayan mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 05 May 2008 - 19:25:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 05 May 2008 - 19:30:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive