Boxplot for both x and y axis with different box widths.
Mostrar comentarios más antiguos
How can we make a boxplot like the one below for both x and y data (the box widths of each group that are x-data related are different). I tried boxplot(X,Y, group) but it did not work.

4 comentarios
Benjamin Kraus
el 30 de Abr. de 2021
boxchart does offer a setting for the box width.
I missed that since BoxWidth is not mentioned on the documentation page for boxchart, however it is listed in the properties page.
Thanks, Benjamin.
Gechang Cao
el 1 de Mayo de 2021
Respuesta aceptada
Más respuestas (1)
markus tripolt
el 18 de Ag. de 2024
0 votos
Hi all,
I have a additional question. Is there a function to set the box width according to the number of data points automatecally, or is the only way to calc the percentage per hand typ it to the width vector?
Thanks Markus
1 comentario
Benjamin Kraus
el 19 de Ag. de 2024
@markus tripolt: If you have a new question, your best bet is to post a new question to MATLAB Answers, rather than adding an "answer" to an existing question.
There is no method to automatically set the box width based on the number of data points. I'm not sure how you would use the number of data points to calculate the box widths.
If you post a new question, can you clarify how you want to convert the "number of data points" into the box width"? In addition, please clarify whether you are referring to boxchart or boxplot, because the answers will be very different between the two.
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
