[R] changing parameters of the box and whisker plot

David Winsemius dwinsemius at comcast.net
Sun May 9 21:20:54 CEST 2010


On May 9, 2010, at 1:33 PM, michael westphal wrote:

> Hello:
>
> I am plotting some data using the box and whisker plot.

What function?

>  However, I only want to plot the median, max and min, as I only  
> have these values and not the quartile values.

You could just read the help page for bxp and send it values that  
yield what you want to see.

?boxplot.stats
?bxp

Or ... using lattice::bwplot you can alter the stats function in  
panel.bwplot.

?panel.bwplot


>  It seems R arbitrarily constructs the box margins to be halfway  
> between the median and the max/min.

Not exactly ...  and not at all arbitrary. Those are at the Q1 and Q3  
values.

>  How do I make the box and whisker plots without the box values?
>
> Thanks,
>
> Michael


David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list