Which data are stored in handles of boxplot?

8 visualizaciones (últimos 30 días)
Szabó-Takács Beáta
Szabó-Takács Beáta el 25 de Nov. de 2015
Respondida: Mike Garrity el 25 de Nov. de 2015
I created a boxplot with
H=boxplot(x);
Could someone which data are contained in H? I think they are not the statistical values (e.g. median).

Respuestas (1)

Mike Garrity
Mike Garrity el 25 de Nov. de 2015
They're the handles of the line objects it created. They've been cast to double (because it's rather old code), but if you're using R2014b or newer, you can get to the objects like this:
load carsmall
h = boxplot(MPG, Origin);
h = handle(h)
h =
7x6 Line array:
Line Line Line Line Line Line
Line Line Line Line Line Line
Line Line Line Line Line Line
Line Line Line Line Line Line
Line Line Line Line Line Line
Line Line Line Line Line Line
Line Line Line Line Line Line
Then you can set properties on them, such as color and line width.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by