Remove gray lines from Boxplot Extrememode
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm trying to remove the gray lines from the boxplot when using ('extrememode', 'compress') settings. I would rather it look more like just an axis break. Anyone know how to do this? Thanks! (I'm using Matlab 2013a)
댓글 수: 0
답변 (1개)
J Philps
2017년 5월 31일
You can access the individual lines in the axes if you wish (and you can set their Color property to [0 0 0]).
Here is an example of how to remove the lines from a simple boxplot using this method:
load carsmall
figure;
boxplot(MPG, 'ExtremeMode', 'compress');
xlabel('All Vehicles')
ylabel('Miles per Gallon (MPG)')
title('Miles per Gallon for All Vehicles')
fig = figure;
boxplot(MPG, 'ExtremeMode', 'compress');
xlabel('All Vehicles')
ylabel('Miles per Gallon (MPG)')
title('Miles per Gallon for All Vehicles')
lines = fig.Children.Children.Children
lines(4).Color = [1 1 1];
lines(5).Color = [1 1 1];
lines(6).Color = [1 1 1];
lines(7).Color = [1 1 1];
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!