What is the unit in Legend of Colormap

5 visualizaciones (últimos 30 días)
Ke Wei Ong
Ke Wei Ong el 15 de Ag. de 2020
Respondida: Walter Roberson el 15 de Ag. de 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?

Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de Ag. de 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.

Más respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by