How to create a boxplot of multivariable?

I'm wanting to create a boxplot with multiple variables similar to this figure. How could I do this?
Thanks!

回答 (1 件)

Adam Danz
Adam Danz 2022 年 3 月 23 日
編集済み: Adam Danz 2022 年 3 月 23 日

0 投票

Use boxchart along with the GroupByColor parameter. There's a nice demo in the documentation. However, that will not provide nested x-labels as shown in your figure.
Alternatively, see boxplotGroup from the File Exchange - there are examples in the Example file that show nested x-labels.

2 件のコメント

Les Beckham
Les Beckham 2022 年 3 月 23 日
Here is a link to the demo mentioned by Adam which will take you directly to the specific GroupByColor demo: https://www.mathworks.com/help/matlab/ref/boxchart.html#mw_236c17e8-7622-48f4-9c28-dc626e7259b0
Adam Danz
Adam Danz 2022 年 3 月 23 日
Thanks @Les Beckham! I updated my link to avoid confusion.

サインインしてコメントする。

質問済み:

2022 年 3 月 23 日

コメント済み:

2022 年 3 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by