[R] boxplot statistics in ggplot

hadley wickham h.wickham at gmail.com
Wed Feb 7 14:12:26 CET 2007


Hi Vikas,

Exactly what do you want to label them with?  Generally the purpose of
the plot is to avoid having explicit labels - you can just read the
numbers of the axes.  If you want the exact numbers, presenting them
in a table might be more appropriate.

I'm not at my development computer at the moment, so I can't give you
the exact details, but you will have to calculate the statistics
yourself (using the weighted boxplot function in ggplot) and add them
to the plot in some way.  This should be a bit easier in the next
version of ggplot, where the calculation and display are a little more
distinct.

Hadley

On 2/7/07, Vikas Rawal <vikasrawal at gmail.com> wrote:
> I need to make weighted boxplots. I found that ggplot makes them. I
> would however like to label them with the boxplot statistics (the
> median, q1 and q3). In the boxplot function in r-base, I could output
> boxplot statistics and then write a text on the plot to place the
> labels. How would one do it with ggplot?
>
> Vikas
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list