colorbarf

Add an accurate colorbar to your filled contour plot.
9.4K Downloads
Updated 4 Apr 2006

View License

Editor's Note: This file was a File Exchange Pick of the Week

This m-file produces a colorbar with solid blocks of color between the contour levels that correspond precisely to the colors in the filled contour plot. This is in contrast to the standard MATLAB colorbar which simply plots all the colors in the colormap and, therefore, only approximates what is being plotted in the filled contour plot.

Cite As

Blair Greenan (2024). colorbarf (https://www.mathworks.com/matlabcentral/fileexchange/1135-colorbarf), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Colormaps in Help Center and MATLAB Answers
Acknowledgements

Inspired: cbarf

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

Updated for better compatibility with MATLAB 7