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

3 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 9 Avr 2020
Modifié(e) : MathWorks Support Team le 9 Avr 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.

Plus de réponses (0)

Catégories

En savoir plus sur Blue dans Help Center et File Exchange

Produits


Version

R2009b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by