Similar to the well known colorbarf but more realistic.
There are two things missing in colorbar and colorbarf:
1. the colorbar ticks are scaled according to the size of each interval.
2. when color is saturated at the upper limit, or when is white, below the lower limit, a triangle is added. The triangle means "more/less than". Such information is not provided by the existing tools, colorbar and colorbarf.
See the examples.
Besides, there is a bug (?) with contourf: in some cases, even with the levels specified, one additional level is added and corrensponds to the sourrounding line! In such case, colorbarf adds one box for this fake level!
Syntax: H=CBARF(DATA,LEVELS,MODE,SCALE)
Updated 13-7-2007 by adding the option SCALE for linear/non linear scale
Cite As
M MA (2026). cbarf (https://se.mathworks.com/matlabcentral/fileexchange/14290-cbarf), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: colorbarf
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | Corrected colors for the nonlinear case |
