fcolorbar: Floating Color Bar (r3)

버전 1.3.0.0 (10.9 KB) 작성자: Kesh Ikuma
Enhancement to the built-in colorbar to improve inside-axes colorbar display
다운로드 수: 276
업데이트 날짜: 2014/10/16

라이선스 보기

***R2014b Compatibility Note: Mouse interaction is enabled but the backpanel is not yet supported.***

FCOLORBAR by default behaves identical to the built-in colorbar function, appending a fixed colorbar to the current axes in the default (right) location. When the colorbar is floating inside the axes (either by LOCATION argument or via the colorbar's context menu) a background panel appears to aid visibility of the colorbar axes labels. Moreover, the colorbar inside the axes can be grabbed using mouse and repositioned anywhere on the figure.

Pre-R2014b Example (adding colorbar to a Signal Processing Toolbox's spectrogram example):

t=0:0.001:2; % 2 secs @ 1kHz sample rate
y=chirp(t,100,1,200,'q'); % Start @ 100Hz, cross 200Hz at t=1sec
spectrogram(y,128,120,128,1E3); % Display the spectrogram
title('Quadratic Chirp: start at 100Hz and cross 200Hz at t=1sec');

cb = fcolorbar('east','FontSize',8); % 'east' -> inside axes colorbar display
ylabel(cb,'Power (dB)') % backpanel widens automatically to be under the ylabel
set(cb,'Position',[0.85 0.14 0.03 0.5]) % background panel automatically follows the colorbar

인용 양식

Kesh Ikuma (2024). fcolorbar: Floating Color Bar (r3) (https://www.mathworks.com/matlabcentral/fileexchange/48076-fcolorbar-floating-color-bar-r3), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Description update

1.2.0.0

R3 (Oct 15, 2014)
- Resizing (no)fix in R2 is removed as it did not fix the resizing issue.
- Added partial support for R2014b. Floating color bar movable by mouse but backpanel is not yet supported.

1.1.0.0

R2 - Fixed backpanel resizing behavior when its ancestor (e.g., figure) is resized. Requires findjobj.

1.0.0.0