Display NaNs values and apply alphadata for values different to NaNs
7 次查看(过去 30 天)
显示 更早的评论
Hello,
I want to display the NaN values by setting an alphadata equal to 0 and at the same time apply an alphadata equal to 0.3 for values different to NaNs?
This is the code i use but it doesn't work:
im=imagesc(I)
set(im,'AlphaData',0.3);
set(im,'AlphaData',~isnan(I))
Thanks,
0 个评论
采纳的回答
Ameer Hamza
2020-11-11
Try this
im = imagesc(I);
im.AlphaData = 0.3*ones(size(I));
im.AlphaData(isnan(I)) = 0;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!