Remove gray lines from Boxplot Extrememode
2 次查看(过去 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!