2 nested boxplots inside each other

조회 수: 2 (최근 30일)
Sam Alex
Sam Alex 2013년 1월 10일
Hello everyone,
Does anyone how I can produce 2 nested boxplots inside each other like the attached image? The purpose is to illustrate one of the boxes via a new scaled one with say a log scaled data

채택된 답변

Jan
Jan 2013년 1월 10일
편집: Jan 2013년 1월 10일
You can simply create to axes, when you specify the position explicitly:
Axes1H = axes;
plot(1:10, rand(1, 10));
Axes2H = axes('Units', 'normalized', 'Position', [0.6, 0.6, 0.2, 0.2]);
plot(1:10, rand(1, 10));
Is it part of the question how to create a boxplot also?
  댓글 수: 7
Jan
Jan 2013년 1월 10일
To remove the XTicks, remove the 'XTick', not the 'XTickLabel'.
Using gca is prone to errors, because the current axes changes, when you click on another axes object. Better use the explicitly obtained axes handle Axes2H as shown in my code example.
Sam Alex
Sam Alex 2013년 1월 10일
Thank you Jan

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by