Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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;

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
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');

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by