Remove gray lines from Boxplot Extrememode

2 ビュー (過去 30 日間)
Kirsten
Kirsten 2017 年 5 月 26 日
回答済み: J Philps 2017 年 5 月 31 日
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)

回答 (1 件)

J Philps
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];

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by