How to remove outlier form boxchart graph ?
141 ビュー (過去 30 日間)
古いコメントを表示
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/507273/image.png)
Or is there any way I can add different color to different box using this command.
boxplot(data(:,:),'symbol' ,' ' )
0 件のコメント
採用された回答
Rik
2021 年 2 月 2 日
You can set the MarkerStyle property to 'none' to hide the markers.
data=rand(100,2);data(end,:)=2;
boxchart(data,'MarkerStyle','none')
その他の回答 (1 件)
hxen
2023 年 5 月 31 日
You can also easily get rid of outliers using the isoutlier function to logically select only non-outlier values as follows:
data(~isoutlier(data));
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!