MATLAB: How could I fix the axes in heatmap in Matlab? or set MaxColorValue

caxiscolorscalingheatmapmaxcolorvaluemincolorvalue

I whant to specify tha maximun color value in a heat map an also the minimun color value .
I have tried the following code.
AA=rand(4,3);
h=heatmap(AA,'ColorScaling','log','MinColorValue',0,'MaxColorValue',5)
It is suppose to work, nevertheless. An error is shown saying that,
The name 'MinColorValue' is not an accessible property for an instance of class 'matlab.graphics.chart.HeatmapChart'.
Thanks in advance

Best Answer

The Min / MaxColorValue parameters didn't appear until r2019a. The documentation in r2018b and prior makes no reference of these parameters. You're probably using a release prior to r2019a but refering to current documentation.
Use caxis() instead.
h=heatmap(AA,'ColorScaling','log');
caxis([0,5])