Why do my colorbars appear to be inappropriately and inconsistently sized in subplots in MATLAB 7.0 (R14)?
1 次查看(过去 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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!