slim_colorbar(varar​gin)

版本 1.3.0.0 (1.4 KB) 作者: Yifan Gu
Just like matlab colorbar but it keeps the size of the associated axes unchanged.
148.0 次下载
更新时间 2017/2/8

查看许可证

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 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Subplots 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.3.0.0

Format the description.

1.2.0.0

Now the function can be called without any input arguments.

1.1.0.0

Add the screenshot.

1.0.0.0