b2r(cmin_input,cmax​_input)

버전 1.2.0.0 (4.63 KB) 작성자: cunjie zhang
matlab blue-white-red colorbar, while zero always corresponds to white color. see also darkb2r
다운로드 수: 4.9K
업데이트 날짜: 2015/4/9

라이선스 보기

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(b2r(-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(b2r(-3,6)) is from light blue to deep red
e.g. colormap(b2r(-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(b2r(-6,8)), colorbar, title('b2r')

There is also a similar colorbar named darkb2r with colors much darker.

인용 양식

cunjie zhang (2024). b2r(cmin_input,cmax_input) (https://www.mathworks.com/matlabcentral/fileexchange/36212-b2r-cmin_input-cmax_input), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

updated: Robert Beckman help to fix the bug when start point is zero, 2015-04-08.The bug exists when the absolute value of cmax and cmin is very near but not equal.

1.1.0.0

updated: Robert Beckman help to fix the bug when start point is zero, 2015-04-08. The bug exists when setted cmax and cmin is very near but not equal.

1.0.0.0