MATLAB: How to remove the extra symbols in a box figure

boxplotmarkers

I got a box figure that is shown here.
This figure includs a red line and a series of box-whisker column.
But there are some red plus symbols under these box columns, and I wonder how to remove these red symbol.

Best Answer

The red + symbols are ouitliers. You cannot eliminate them, however if you set their colours to white, you can make them effectively disappear. Use 'Symbol','w+' to do that.
Example:
x1 = normrnd(3,1,100,1);
x2 = normrnd(6,1,100,1);
figure
hbp = boxplot([x1,x2],'Notch','on','Labels',{'mu = 3','mu = 6'}, 'OutlierSize',20); % Large Outliers
figure
hbp = boxplot([x1,x2],'Notch','on','Labels',{'mu = 3','mu = 6'}, 'Symbol','w+'); % Use 'Symbol','w+' To Make The Outliers Invisible