colorbarf

Add an accurate colorbar to your filled contour plot.

You are now following this Submission

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 (2026). colorbarf (https://in.mathworks.com/matlabcentral/fileexchange/1135-colorbarf), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: cbarf

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Updated for better compatibility with MATLAB 7