SLIM_COLORBAR Display color bar (color scale)
Just like matlab colorbar but it keeps the size of the associated axes
unchanged and allows user to specify the width of colorbar.
USAGE:
slim_colorbar
slim_colorbar(width)
slim_colorbar(width, ax_acc)
[ ax_c ] = slim_colorbar(...)
ARGUMENTS (optional):
width -- width of colorbar (% of figure width, suggest 0.01)
ax_acc -- the associated axes (the default is the current one)
OUTPUT:
ax_c -- axes handle of the colorbar
EXAMPLE:
{
figure('NumberTitle','Off','Name','Slim colorbar','color','w');
subplot(2,2,1);
plot(1:10);
subplot(2,2,3);
plot(1:10);
xlabel('Matlab colorbar')
colorbar
subplot(2,2,2);
plot(1:10);
ax_acc = subplot(2,2,4);
plot(1:10);
xlabel('Slim colorbar')
slim_colorbar(0.01, ax_acc);
% or slim_colorbar(0.01)
% or simply slim_colorbar;
}
引用
Yifan Gu (2024). slim_colorbar(varargin) (https://www.mathworks.com/matlabcentral/fileexchange/61455-slim_colorbar-varargin), MATLAB Central File Exchange. 取得済み .
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Combine Multiple Plots > Subplots >
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!