View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 3.01 KB File ID: #39985 Version: 1.0
image thumbnail



Jurgen (view profile)


Set colormap entry for zero values to specified RGB color

| Watch this File

File Information

The images are generated by the examples in the help section.

Updates current figure's colormap so that zeros get color CLR. CLR is a vector between 0-1, e.g. [.4 .2 .9] or a standard MATLAB color string.

cmap = zerocolor(H,CLR)
Returns the updated colormap cmap based on the figure with handle H.

See the function help for all the syntax options. Not hard to adjust the code for an arbitrary value other than zero.

feedback is welcome


Sc Powerful Image Rendering and Adaptive Colormap Function Creates A Colormap Specific To Data inspired this file.

This file inspired Valcolor.

Required Products MATLAB
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us