フィルターのクリア

specifing a colorbar parent/figure

3 ビュー (過去 30 日間)
William
William 2015 年 4 月 2 日
コメント済み: William 2015 年 4 月 16 日
How are you supposed to set the figure to which a colorbar is associated? At the moment, when I introduce a colorbar it automatically assigns itself to another figure without any mention of that figure.
i.e. associate colorbar with "plot" figure
imshow(data,'Parent',plot);
colormap(plot, jet)
colorbar
caxis(plot,[0 max_I])
Many thanks,
  1 件のコメント
William
William 2015 年 4 月 16 日
still stuck on this, please advise

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 16 日
After R2014b:
imshow(data, 'Parent', hPlot);
colormap(hPlot, jet(256));
colorbar(hPlot);
R2014a and earlier:
axes(hPlot);
imshow(data);
colormap(jet(256));
colorbar;
Do NOT use plot as the handle to your axes. plot() is the name of a built in function and it is never a good idea to use the names of built-in functions for your variables.
  1 件のコメント
William
William 2015 年 4 月 16 日
thanks for the heads up

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by