Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

display the mean in boxplots?

1,041 views
Skip to first unread message

Alex R. Crowan

unread,
Apr 20, 2009, 11:20:02 AM4/20/09
to
Hi there!

Is there a simple way to display the mean in boxplots, marked with a diamond/triangle or whatever?

If there is no simple way, can it be done with the hold command or something? And can a how-to be found in the archives or matlab help. I don't want to annoy anybody by having him write long explainations I could have easily looked-up for myself.

Thanks a lot
Alex

Ambarish Jash

unread,
Apr 20, 2009, 11:49:01 AM4/20/09
to
You can type help boxplot. But this is not the GUI rendering of help. Click on help and then product help. On the search bar type boxplot. The GUI rendering will show you how to do it.
"Alex R. Crowan" <my.interne...@ggmmxx.nneett> wrote in message <gsi3r2$ako$1...@fred.mathworks.com>...

Alex R. Crowan

unread,
Apr 20, 2009, 12:44:01 PM4/20/09
to
"Ambarish Jash" <ambari...@colorado.edu> wrote in message <gsi5hd$b5h$1...@fred.mathworks.com>...

You can type help boxplot. But this is not the GUI rendering of help. Click on help and then product help. On the search bar type boxplot. The GUI rendering will show you how to do it.

Thanks for the answer, but I already checked the help function (Matlab 2008a) and there is neither a parameter for nor an example with the mean.
The newsgroup search for boxplot didn't return anything useful (28 Hits) and the search for the word boxplot and mean is invalid because of the common usage of "mean"...
Google search couldn't help either.

Is the hold function the last straw (besides photoediting ;-) )?

Pekka Kumpulainen

unread,
Apr 22, 2009, 2:40:20 AM4/22/09
to
"Alex R. Crowan" <my.interne...@ggmmxx.nneett> wrote in message <gsi8oh$o0f$1...@fred.mathworks.com>...

No, not the last but the first. Did you try to hold and plot?
x = log(rand(100,5));
h = boxplot(x);
mx = mean(x);
hold on
plot(mx,'d')
% should work
Or you can just add a line using low level commands
hl = line('XData',1:5', ...
'YData',mx,...
'LineStyle','none', ...
'Marker','d');

0 new messages