Home give a color to not a number
Reply: 0

give a color to not a number

user592
1#
user592 Published in May 24, 2018, 3:53 pm

I have a matrix of integers, padded with nans

M=

 1     2     2     3     4     4
 2     2     2     3     4   NaN
 2     2     2     3     4   NaN
 2     2     2     3     4   NaN
 2     2     2     3     4   NaN
 2     2     2     3     4   NaN

I am plotting it using imagesc

imagesc(M)

However, if I plot it this way, NaN and 1 are shown with the same color, which is confusing.

How to have different colors for NaNs in imagesc?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.333808 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO