I found out the solution by using
caxis manual
caxis([0,3]);
But the prerequisite is that the values should be linearlly distributed with the same gap in between.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!