필터 지우기
필터 지우기

What is the unit in Legend of Colormap

조회 수: 4 (최근 30일)
Ke Wei Ong
Ke Wei Ong 2020년 8월 15일
답변: Walter Roberson 2020년 8월 15일
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?

채택된 답변

Walter Roberson
Walter Roberson 2020년 8월 15일
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개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by