I have made a surface plot for a function with a maximum value of 10, and then I set the 'CDataMapping' property of the surface object to 'direct'. I turn the colorbar on, and the ticks of the colorbar say that the last color in the colormap represents 10. But on the plot, the value 10 is colored with the 10th color in the colormap. I would like the colorbar to be aware of the 'CDataMapping' setting, and adjust its tick mark labels automatically.
MATLAB: Does the colorbar inaccurately reflect the relationship between colors and function values when CDataMapping is set to direct
MATLAB
Related Question
- How to make the ticks in the colorbar appear at the center of each color in MATLAB 7.0 (R14)
- Can I specify a particular matrix for the colorbar
- Does “imagesc” shift the shape upward when plotting density
- Changing the number format of colorbar values
- Multiple colormap not working when using COLORMAP(AX,…)
- Does the color data get scaled when I am using the FILL3 function even if I specify the correct indices of the colormap
- How to create a colorbar that only uses a portion of the colormap in MATLAB 7.0 (R14)
Best Answer