Boxchart(箱ひげ図)におけるペア間の幅を調節したい Adjust widths between each boxchart pairs
Mostrar comentarios más antiguos
現在、画像のような箱ひげ図を作成しています。各ペア(赤と青)の幅をなくしたいのですが、どうすればよいでしょうか。factorgapという関数を用いたらできそうですが...。以下、コードです。よろしくお願いします。
tbl1 = readtable('file.csv');
ProtocolOrder = {'A','B','C','D','E'};%x軸の順を定義
boxchart(tbl1.Type,tbl1.RMS,'GroupByColor',tbl1.Side)%BoxChartの作成
b1 = boxchart(tbl1.Type,tbl1.RMS,'GroupByColor',tbl1.Side) %BoxChart格納
~以下書式に関しては省略~
yticks([0 100 200 300 400]);%y軸間隔を定義
b1(1).XTickLabel = [];x軸を空白
b1(2).XTickLabel = [];
legend
6 comentarios
Atsushi Ueno
el 20 de Dic. de 2021
Raki Kawama
el 20 de Dic. de 2021
Atsushi Ueno
el 20 de Dic. de 2021
> BoxPlotですと完成したのですが⇒と言う事はBoxPlotを使った回答は不要なんですね。
この質問は、質問者が削除しない限りずっと残ります。
そのBoxPlotを使った完成例を挙げておけば、将来同じ事を必要とする後学者の為になると思います。
Atsushi Ueno
el 20 de Dic. de 2021
>デザインがBoxChartの方が綺麗だなと...。
単純なグラフィックスなのでBoxPlotとBoxChartを殆ど同じ絵にする事は可能と思いますが、配置などの微妙な違いを「綺麗だ」と表現されているのでしょうか?美的センスは人それぞれですが
私ならより高機能で目的を実現できるBoxPlotを使いますね。要求
Raki Kawama
el 21 de Dic. de 2021
Raki Kawama
el 21 de Dic. de 2021
Respuestas (0)
Categorías
Más información sobre 調査と可視化 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!