Remove gray lines from Boxplot Extrememode

2 visualizaciones (últimos 30 días)
Kirsten
Kirsten el 26 de Mayo de 2017
Respondida: J Philps el 31 de Mayo de 2017
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)

Respuestas (1)

J Philps
J Philps el 31 de Mayo de 2017
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];

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by