CBNEEDLE

Add a 'needle' to a colorbar.
2K Downloads
Updated 1 Sep 2016

View License

CBNEEDLE is used to create a 'needle' or an indicator on a colorbar. Currently, the possible input combinations are: none (searches for a colorbar, adds needle at average y value), handle for colorbar axis (adds needle at average y value), y value (searches for colorbar,adds needle at specified y value), colorbar axis and y value. Output is handle to 'needle' (patch object).
Examples:

surf(peaks); c = colorbar;

%add needle at middle point
cb = cbneedle;

delete(cb)

%add needle to 'c'
cb = cbneedle(c);

delete(cb)

%add needle at 3
cb = cbneedle(3);

delete(cb)

%add needle to 'c' at 5
cb = cbneedle(c,5);

delete(cb)

Cite As

Steve Simon (2024). CBNEEDLE (https://www.mathworks.com/matlabcentral/fileexchange/1891-cbneedle), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

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.1

Updated license

1.0.0.0