What is the unit in Legend of Colormap
3 views (last 30 days)
Show older comments
Ke Wei Ong
on 15 Aug 2020
Answered: Walter Roberson
on 15 Aug 2020
May I know what is the unit in the legend of the colormap, is it in meter or millimeter?
Here is the syntax I used:
'colormap(ax2, jet)'
There is a legend generated with color and label of [0, 1], but I would like what is the unit measure ? is it in meter or millimeter?
0 Comments
Accepted Answer
Walter Roberson
on 15 Aug 2020
It is not what matlab would generally call a legend: matlab would call it tick marks or tick labels.
There is no unit associated. The scale runs from the lower bound of caxis to the upper bound of caxis.
When you have not manually set caxis, it defaults to the range of z values for line and surface and contour plot objects, or to the valid range of CData for image objects. For example if you have an image object with uint8 then the default caxis would be 0 to 255. If you have an image object that is double() then the default caxis is 0 to 1, relative intensity compared to white.
In the case where nothing has been plotted then the default caxis is 0 to 1.
If you are not using images then caxis is going to be default to your z data range, and so will have whatever unit your data has.
0 Comments
More Answers (0)
See Also
Categories
Find more on Colormaps 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!