MATLAB: How to see the changes in the image color when I manually edit the bounds in the COLORMAPEDITOR in MATLAB (R2013a)

cdatamappingcolormapeditordirectMATLABscaled

When I change the Min and Max values of the Color Data in the COLORMAPEDITOR, I do not see any changes in my figure. I have a line object on my figure. Could you please explain why is this so?

Best Answer

The ability to change the Color Data Mapping for line is not possible, as of MATLAB (R2013a). However, for surface, image and patch objects, you can do so by changing the default Color Data Mapping from 'direct' to 'scaled'.
Here is an example that shows that:
clc
close all
clear all
load flujet
image(X)
colormap(jet)
set(gcf,'windowstyle','docked')
hc = get(gcf,'children');
hcc = get(hc ,'children');
set(hcc,'cdatamapping','scaled')
% Launch the colormap editor
Colormapeditor
For this case, the default color data limits are 1 and 64. Now, in the COLORMAPEDITOR, you can manually change the values of Color Data min and Color Data max to -10 and 20, for example and you will see that the figure color is updated.