how to set the range in the colorbar manually?

前端 未结 3 1458
不知归路
不知归路 2020-12-06 13:39

I have a wide range of values and while plotting as a scatter(x,y,z), the colorbar showing the z axis shows a wide range of values, now I am not interested in the lower rang

3条回答
  •  生来不讨喜
    2020-12-06 14:22

    How about this?

    % don’t know why, but apparently your x and y are one value too long?
    x = x(1:end-1); y = y(1:end-1); 
    
    % only plot values of 14 or higher
    scatter(x(gnd>=14), y(gnd>=14), 5, gnd(gnd>=14);
    

提交回复
热议问题