Number of digits in heatmap plot

조회 수: 81 (최근 30일)
M.G.
M.G. 2020년 11월 18일
댓글: M.G. 2020년 11월 18일
Hello everyone,
I've created a heatmap from the values formatted as x.yy, so I have three number of digits. My problem is that one of my values is 8.00 and it is displayed in the heatmap as just "8". Is there a way to force the heatmat it to display all values (including this 8.00 point) with 3 number of digits?

채택된 답변

Adam Danz
Adam Danz 2020년 11월 18일
I think what you mean is that your heatmap values contain 2 decimal places except for integer value and you want to include two decimal places in the integer values.
h = heatmap(___)
h.CellLabelFormat = '%.2f';
Otherwise, try other number formats such as %.2g.
  댓글 수: 1
M.G.
M.G. 2020년 11월 18일
It works, thank you so much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by