slim_colorbar(varar​gin)

バージョン 1.3.0.0 (1.35 KB) 作成者: Yifan Gu
Just like matlab colorbar but it keeps the size of the associated axes unchanged.
ダウンロード: 148
更新 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 Center および MATLAB AnswersSubplots についてさらに検索
タグ タグを追加

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