It sounds like you would like to plot your data to have greater color variation in a certain range, but would prefer not to transform your data. For a task like this, I would suggest creating your own nonlinear colormap. I have constructed an example below which you may be able to adapt to your code and data.
Note that you could also change how your colorbar displays, but I have focused on the colormap itself.
First, I’d pick an existing colormap, such as Parula. Specify the max and min values of your data (e.g. 34 and -350), and then select the value at which you would like more color variation (e.g. perhaps 34 or 0). You can play with the scaling intensity parameter to see what looks nice.
cMap = parula(256);
dataMax = 192;
dataMin = 1;
centerPoint = 1;
scalingIntensity = 5;
Then perform some operations to create your colormap. I have done this by altering the indices “x” at which each existing color lives, and then interpolating to expand or shrink certain areas of the spectrum.
x = 1:length(cMap);
x = x - (centerPoint-dataMin)*length(x)/(dataMax-dataMin);
x = scalingIntensity * x/max(abs(x));
Next, select some function or operations to transform the original linear indices into nonlinear. In the last line, I then use “interp1” to create the new colormap from the original colormap and the transformed indices.
x = sign(x).* exp(abs(x));
x = x - min(x); x = x*511/max(x)+1;
newMap = interp1(x, cMap, 1:512);
Then plot!
load cape;
figure; imagesc(X);
figure; imagesc(X); colormap(newMap);