How can I see the changes in the image color when I manually edit the bounds in the COLORMAPEDITOR in MATLAB (R2013a)?
2 views (last 30 days)
Show older comments
MathWorks Support Team
on 21 May 2013
Edited: MathWorks Support Team
on 9 Apr 2020
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?
Accepted Answer
MathWorks Support Team
on 9 Apr 2020
Edited: MathWorks Support Team
on 9 Apr 2020
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!