How to remove the extra symbols in a box figure?

12 views (last 30 days)
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.
  2 Comments
ZHENRONG TIAN
ZHENRONG TIAN on 16 Feb 2019
The data is attached here.
And the code to plot it is quite simple, just 'boxplot(A);' for example.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 15 Feb 2019
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

More Answers (0)

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!