MATLAB Answers

How to remove outlier form boxchart graph ?

3 views (last 30 days)
data = xlsread('data.xlsx');
x = 1:36;
figure();
ax = axes();
hold(ax);
for i=1:36
fig = boxchart(x(i)*ones(size(data(:,i))), data(:,i));
fig.BoxFaceColor = color(i,:);
end
I've got this boxchart with outlier show on them how can I hide them. I tried 'symbol' ' ' but it didn't work with boxchart it works with boxplot.
Or is there any way I can add different color to different box using this command.
boxplot(data(:,:),'symbol' ,' ' )

Accepted Answer

Rik
Rik on 2 Feb 2021
You can set the MarkerStyle property to 'none' to hide the markers.
data=rand(100,2);data(end,:)=2;
boxchart(data,'MarkerStyle','none')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by