Number of digits in heatmap plot

96 ビュー (過去 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 Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by