Threshold to set colour for different scale range in Heatmap
版本 1.0.0 (62.5 KB) 作者:
Kevin Chng
As of R2019b, There is no in-built function to set the colour of different scaled range in heatmap. Perhaps, this function can faciliate you
How to use this function?
The function name is generatecolormapthreshold, first argument is the threshold and second argument is the colour
color= generatecolormapthreshold([1 10 25 30],[0 0.5 1; 0 1 0;1 0 0]);
h = heatmap(fluS,'DayName','noofweek','ColorVariable','Max_Data','Colormap',color,'ColorLimits',[1 30]);
h.FontSize=10;
h.Title='Heatmap';
means that range 1-25 is the colour for [0 1 1], 25-30 is the colour [1 0 0].
引用格式
Kevin Chng (2024). Threshold to set colour for different scale range in Heatmap (https://github.com/KevinChngJY/heatmapthresholdmatlab), GitHub. 检索时间: .
MATLAB 版本兼容性
创建方式
R2020a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!无法下载基于 GitHub 默认分支的版本
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |
|
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库。
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库。