I'm working on a grid displaying data on a map of the CONUS. In order to better differentiate the lower values, I want to create a log color scale. However, when I try to add my colorbar at the end, it gives me an error: "While setting the 'Limits_I' property of ColorBar: Value must be a 1×2 vector of numeric type in which the second element is larger than the first". I am seeking some guidance in a workaround. Thanks.
states = geoshape(shaperead('usastatehi', 'UseGeoCoords', true));figure('Visible','on');hold onax = usamap([25 50],[-125 -65]);geoshow(states,'FaceColor', 'w','FaceAlpha',.3)geoshow(Y, X, Z, 'DisplayType','texturemap','FaceAlpha',.8)myscale = [0 1.5];caxis(log10(myscale))colormap(flipud(jet))colorbar
Best Answer