darkb2r(cmin_input,cmax_input)
this matlab file is designed to draw anomaly figures, the color of the colorbar is from blue to white and then to red, corresponding to the anomaly values from negative to zero to positive, respectively.
The color white always correspondes to value zero.
You should input two values like caxis in matlab, that is the min and the max value of color values designed. e.g. colormap(darkb2r(-3,5))
The brightness of blue and red will change according to your setting, so that the brightness of the color corresponded to the color of his opposite number
e.g. colormap(darkb2r(-3,6)) is from light blue to deep red
e.g. colormap(darkb2r(-3,3)) is from deep blue to deep red
I'd advise you to use colorbar first to make sure the caxis' cmax and cmin
Examples:
------------------------------
figure
peaks;
colormap(darkb2r(-6,8)), colorbar, title('darkb2r')
There is also a similar colorbar named b2r with colors much lighter.
引用格式
cunjie zhang (2024). darkb2r(cmin_input,cmax_input) (https://www.mathworks.com/matlabcentral/fileexchange/36210-darkb2r-cmin_input-cmax_input), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- MATLAB > Graphics > Formatting and Annotation > Colormaps > Blue >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!