필터 지우기
필터 지우기

Set scale of boxplots

조회 수: 11 (최근 30일)
Emu
Emu 2024년 5월 4일
댓글: Emu 2024년 5월 4일
I'm plotting a load of boxplots, but some of them are plotting at different scales e.g. x10-4 vs x10-5 (see top left corner), how do I make the scale uniform?

채택된 답변

the cyclist
the cyclist 2024년 5월 4일
% Make some pretend data
rng default
x = 1.e-5*rand(1000,16);
% Boxplot
boxplot(x)
% Fix the y-axis scale
ylim([0 1.e-4])
  댓글 수: 2
the cyclist
the cyclist 2024년 5월 4일
You might also find the linkaxes function useful, depending on how you are doing your plotting. It will assign the axis limits dynamically, but ensure that they are shared between your plots.
Emu
Emu 2024년 5월 4일
Thank you this worked perfectly: ylim([-2.e-4 2.e-4]) :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by