The heatmap figures I used to plot on Matlab had the values labeled in each cell (just like the documenation says), but now the figure doesn't include the text. I'm not sure if I made changes to some settings. Does anyone know what the issue is?
For instance, I get the correct output here, when I run the following on web.
figure
heatmap(magic(5)); colormap(sky)
But this is what I get when I run this locally on my computer.
** EDIT: I run 2024a

 채택된 답변

Steven Lord
Steven Lord 2024년 9월 12일
이동: Steven Lord 2024년 9월 12일

2 개 추천

Let's check that you're using the heatmap function included in MATLAB and not a different heatmap.m that you've written yourself or downloaded from somewhere else. What does this command show?
which -all heatmap
/MATLAB/toolbox/matlab/specgraph/heatmap.m /MATLAB/toolbox/matlab/bigdata/@tall/heatmap.m % tall method

댓글 수: 2

Jake
Jake 2024년 9월 12일
이동: Steven Lord 2024년 9월 12일
Yup! You were right, I had a custom heatmap function stored in my main simulation folder. Thank you.
I can accept this if it's posted as an answer :)
zzm oliver
zzm oliver 2024년 9월 18일
I met the same problem. However, which -all heatmap showed that I have not other custom heatmap function in my path.What is weird on my computer is that when I zoom in, I can see the values in the cell. However, I cannot see them when clicking the "house" icon on the top-right to restore to default view. I am using R2024b.

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

추가 답변 (1개)

Taylor
Taylor 2024년 9월 12일

0 개 추천

I'm not able to reproduce this in R2024a myself either. You can assign the output of heatmap to a variable to access the heatmap properties though. CellLabelColor and ColorbarVisible are some properties to start with.

댓글 수: 1

Jake
Jake 2024년 9월 12일
Hi @Taylor! The comment from @Steven Lord seemed to nudge me in the correct direction, and I think having a custom function changed the behaviour.

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

카테고리

도움말 센터File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

태그

질문:

2024년 9월 12일

댓글:

2024년 9월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by