필터 지우기
필터 지우기

Why do my colorbars appear to be inappropriately and inconsistently sized in subplots in MATLAB 7.0 (R14)?

조회 수: 2 (최근 30일)
When I add a colorbar to my subplots, it can be inappropriately, and sometimes inconsistently sized. The width appears to be greater than that produced by earlier releases. As an example, use the following commands to produce a plot:
A = rand(100,100);
B = rand(100,100);
C = rand(100,100);
subplot (1, 3, 1); plot(A); colorbar;
subplot (1, 3, 2); plot(A); colorbar;
subplot (1, 3, 3); plot(A); colorbar;

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This enhancement has been incorporated in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
As of MATLAB 7.0 (R14), the COLORBAR function included changes to provide more room for the colorbar, and to prevent the overlap of tick marks between adjacent plots. As a consequence, the size of the data axis is now smaller, which causes colorbars to sometimes appear disproportionately larger.
As a workaround, the behavior of earlier releases may be matched by passing 'v6' as a parameter to the COLORBAR function, as in the following example:
A = rand(100,100);
B = rand(100,100);
C = rand(100,100);
subplot (1, 3, 1); plot(A); colorbar('v6');
subplot (1, 3, 2); plot(A); colorbar('v6');
subplot (1, 3, 3); plot(A); colorbar('v6');

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by