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

boxplot without outliers

3,517 views
Skip to first unread message

michael

unread,
Nov 17, 2008, 12:51:02 PM11/17/08
to
I'd like to use boxplot but with no (or invisible) outliers. I can see how to change the box/whisker but the outliers remain red. How do I get rid of them altogether? Thanks, M

michael

unread,
Nov 17, 2008, 3:46:04 PM11/17/08
to
"michael " <michae...@manchester.ac.uk> wrote in message <gfsau6$p0i$1...@fred.mathworks.com>...

> I'd like to use boxplot but with no (or invisible) outliers. I can see how to change the box/whisker but the outliers remain red. How do I get rid of them altogether? Thanks, M

h=boxplot(...)
set(h(7,:),'Visible','off')

Pekka Kumpulainen

unread,
Nov 18, 2008, 5:01:02 AM11/18/08
to
"michael " <michae...@manchester.ac.uk> wrote in message <gfsl6b$ngh$1...@fred.mathworks.com>...

Wonder if there is a reason why the documentation doesn't say anything about the matrix of handles that boxplot returns, skipped my eyes at least (R2008b). It only suggests to use findobj to find handles of various parts of the plot.
h=findobj(gca,'tag','Outliers');

Tom Lane

unread,
Nov 19, 2008, 12:34:36 PM11/19/08
to
> Wonder if there is a reason why the documentation doesn't say anything
> about the matrix of handles that boxplot returns, skipped my eyes at least
> (R2008b). It only suggests to use findobj to find handles of various parts
> of the plot.
> h=findobj(gca,'tag','Outliers');
>

Older versions of the boxplot help used to recommend using the output array
of handles. In more recent releases there have been options added so that
the number and type of handles can vary. There is still the output array.
But the "findobj" approach will work regardless of whether the style is
traditional or compact, for example.

-- Tom


Elena

unread,
Jun 5, 2011, 2:07:04 PM6/5/11
to
not the nicest solution, but you can set the outlier size to zero, and then change the range of the y-axis if necessary.

JUAN DAVID PEREZ

unread,
Feb 12, 2015, 4:54:43 PM2/12/15
to
After this:
h=findobj(gca,'tag','Outliers');

Just type:

delete(h)
0 new messages