
boxplotの横軸に対数スケールを設定することは可能ですか?
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ohashi Asuka
am 17 Mär. 2020
Kommentiert: Kenta
am 19 Mär. 2020
横軸を対数スケール,縦軸を線形スケールとした箱ひげ図を作成したいのですが,方法が分かりません.
ひとまずerrbarを使って,平均値と最大・最小値をプロットすることが出来ましたが,
分散も合わせて表示したいので,箱ひげ図が書きたいです.
0 Kommentare
Akzeptierte Antwort
Kenta
am 17 Mär. 2020

rng default
x = randn(100,10);
figure
xx=[1:10];
position=round(10.^(0.5.*xx),0);
subplot(3,1,1)
plot(position)
subplot(3,1,2)
boxplot(x,'positions',position)
subplot(3,1,3)
boxplot(x,position,'positions',log(position))
こんにちは、'position'と書いて、そのあとでx方向のプロットする場所を指定できます。上のような例でいかがでしょうか。
xの値が、指数関数的に増加するので、そのままbox plot関数を実行しても、うまく表示できないですが、
下の図ではうまく表示できていると思います。
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Log Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!