How to replace certain cells in heatmap with "Not Detected"?

3 views (last 30 days)
I am working on a heatmap and some of my data values are 0. Is there a way to replace these cells with "Not Detected"? Thanks!

Accepted Answer

jonas
jonas on 14 Sep 2018
Best you can do is probably to set all zeros to NaN and then add this line
set(gca,'missingdatalabel','not detected')
Zeros can be set to NaN by logical indexing. If A is your matrix with values:
A(A==0)=NaN

More Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!