MATLAB Answers

John Soong

boxplot insists on removing outliers, is there an option to disable outlier removal?

Asked by John Soong
on 30 Nov 2012

I want to completely disable outlier removal. My data is not normally distributed, so I need all the points to affect the mean.




No products are associated with this question.

1 Answer

Answer by Tom Lane
on 30 Nov 2012

Can you explain more about what you want? Ordinarily the boxplot doesn't remove outliers, but instead shows them as separate markers on the plot. Is that what you want to prevent? Here are two invocations of boxplot, one of which includes the outlier in the box-like part rather than as a separate marker:


The line across the center of the box is at the median, not the mean, so the outlier doesn't really affect its value directly.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today