Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

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

Asked by John Soong

John Soong (view profile)

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.


John Soong

John Soong (view profile)



No products are associated with this question.

1 Answer

Answer by Tom Lane

Tom Lane (view profile)

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.


Tom Lane

Tom Lane (view profile)

Contact us