Borrar filtros
Borrar filtros

boxplotの横軸​に対数スケールを設定​することは可能ですか​?

9 visualizaciones (últimos 30 días)
Ohashi Asuka
Ohashi Asuka el 17 de Mzo. de 2020
Comentada: Kenta el 19 de Mzo. de 2020
横軸を対数スケール,縦軸を線形スケールとした箱ひげ図を作成したいのですが,方法が分かりません.
ひとまずerrbarを使って,平均値と最大・最小値をプロットすることが出来ましたが,
分散も合わせて表示したいので,箱ひげ図が書きたいです.

Respuesta aceptada

Kenta
Kenta el 17 de Mzo. de 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 comentarios
Ohashi Asuka
Ohashi Asuka el 19 de Mzo. de 2020
分かりやすく説明していただき,ありがとうございました.とても助かりました.
Kenta
Kenta el 19 de Mzo. de 2020
はい、解決し、よかったです!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2 次元および 3 次元プロット en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!