Remove data labels in a heatmap
古いコメントを表示
I am using a heatmap containing a grid of 1000x1000 points. The data values are displayed on the x and y axis, which is too much; they overlap since there are too many. I would like to remove all data and keep only the xlabel, ylable, and title with a larger font size. I am not sure how to change the font size either. I tried several things without luck.
Here is my command where "a" is the 1000x1000 matrix.
heatmap(a,'xlabel','\mu','ylabel','\nu','title',['Frequency of (\mu, \nu) for ','\epsilon = ',num2str(epsilon)]);
Thank you.
採用された回答
その他の回答 (3 件)
Shipra Jain
2020 年 4 月 29 日
3 投票
Hi,
Is there a way to show only some selective labels on Yaxis?
E.g. I have about 120 labels from 1970-2090. I would like only 1970, 1980, 1990....2090 to appear and switch off the other ones. Is that possible?
Thanks in advance.
Deepali Kushwaha
2023 年 6 月 8 日
To remove all xlabel, ylabel and tickslabel:
heatmap(arr,'CellLabelColor','none')
In case you want to retain all labels except xticklabel:
heatmap(arr,'XDisplayLabels',NaN*ones(length(arr),1))
1 件のコメント
Md Nazmul Anam
2023 年 12 月 13 日
編集済み: Md Nazmul Anam
2023 年 12 月 13 日
Thanks a lot! This is the only solution out of 10s at least which solved the issue without messing something else in my plot!
Pingsheng Ren
2020 年 12 月 17 日
0 投票
Ax.CellLabelColor='none';
カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!