Hello!
I'm making some plots with contourfm and I'm trying to use caxis to set the color limits to a specific range.
f = figure(1)axesm ('mercator','MapLatLimit',latlim,'MapLonLimit',lonlim)contourfm(Y,X,Z)caxis([0 2000])contourcbar
If the values of my data (Z) go up to 2000, then the colorbar produced is fine and the colors are correctly distributed in the colorbar. But if my data doesn't go up to 2000, let's say the maximum it's 1000, then the colorbar distributes all the colors until 1000, and between 1000 and 2000 it's all full of the same color.
I tried looking for an answer but the only subject I found similar to this is this other question. However, I have no idea how to apply that on my code to try that out.
I'm using matlab R2015b.
Please let me know if you need more info of the code I'm using, or if you need a screenshot of the colorbar I'm getting.
Thanks in advance!
Best Answer