File Exchange

image thumbnail

cbarrow: pointy ends for colorbars

version (393 KB) by Chad Greene
Make pointed ends for colorbars


Updated 17 Jun 2016

View Version History

View License

This function makes pointed ends for colorbars to indicated that values have been clipped.

Cite As

Chad Greene (2020). cbarrow: pointy ends for colorbars (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (14)

Behzad Navidi

Dear all,
I have a problem using this function. After I use it the color bar get extremely thick and locates far away from my figure. Here is the link of my question:
Thank you

joey wang

Jing Ci Neo

Huang Yan



does the trick!



Excellent function!
A minor fix that I've used to maintain the "figure('visibility', 'off')" setting -- change line 252 "axes(h)" to "set(gcf, 'CurrentAxes', h)", and similar for line 255. Otherwise, an invisible figure becomes visible when you call this function.

qiuping Ren

Thanks!Good job!

Gloria Wang

thanks so much


Thanks Chad, works fine!

Chad Greene

Ah, good catch Aodat! Thanks for pointing this out. The bug should be fixed now.


Thanks Chad!
I'm experiencing a bug with cbarrow('down').
Example code:
figure; colorbar; cbarrow('down');
Doesn't work properly for me, but shows additional lines. Would be great if you could fix that. Tested with Matlab 2015a & 2015b.

OUC Polar

Thank you so much!

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!