Can I assign specific colors to values for an imagesc plot and use a colormap for others?
2 次查看(过去 30 天)
显示 更早的评论
I am trying to make a map using imagesc. I have different classes of data I need to show. Right now I am using a default colormap (I think it is parula) to color the value of each pixel. I want to manually assign the colors for certain values if possible. The classes are as follows:
0 to 1.5= ratio of kelp cover (0 is open water)
3=land
-1=error
-2=cloud cover (also open ocean beyond the coastal area I am interested in)
I want to still be able to see the ratio of kelp cover on a colorbar scale but I want to make the error and cloud classes easier to distinguish (for example, a bright color - maybe red - for the error class and white for cloud).
I found some similar questions and answers online but for the custom colorbars people had discrete values assigned for each value. I'm not sure what to do since I need the kelp color classes (0-1.5) to to scale with the color. Does that make sense?
I am attaching sample map data (data.mat).
imagesc(kelp_may) %plots the kelp cover as I am doing it now
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Green 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!