mariya ferdousi
2018-06-28 10:30:22 UTC
Hi everyone,
I'm plotting some contour map (x, y, z). In Maltab, using
pcolor(x, y, z);
shading interp;
colormap(flipud(gray(256)));
colorbar;
Now I want to control the colorbar range from -15 to -20. I tried by the command
set(gca, 'clim', [-15 -20]);
and
caxis([-15 -20]).
Both commands show the error
Error using matlab.graphics.axis.Axes/set
While setting property 'CLim' of class 'Axes':
Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf.
Any suggestions to solve this problem?
I'm plotting some contour map (x, y, z). In Maltab, using
pcolor(x, y, z);
shading interp;
colormap(flipud(gray(256)));
colorbar;
Now I want to control the colorbar range from -15 to -20. I tried by the command
set(gca, 'clim', [-15 -20]);
and
caxis([-15 -20]).
Both commands show the error
Error using matlab.graphics.axis.Axes/set
While setting property 'CLim' of class 'Axes':
Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf.
Any suggestions to solve this problem?