How to make colorbar maximum limits smae/uniform?

2 ビュー (過去 30 日間)
Nisar Ahmed
Nisar Ahmed 2022 年 7 月 14 日
コメント済み: Nisar Ahmed 2022 年 7 月 14 日
Hi everyone,
I hope you are doing well.
Attached is a figure and lesft size colorbar has max limit around 2.6 while right side has around 2.8. For more better comparison, I want to plot with same scale. How can I adjust it? Data is also arttached for both figs. d is x axis, TWTn1 is Y axis.
My figure code is as (I have to adjust it for all figures/subplots.
subplot(5,2,9); p = pcolor(d,TWTn1./1000,qs); p.EdgeColor = 'interp'; axis ij; ylim([0 5.000]);
ylabel('Time (s)'); h1 = colorbar; h1.Label.String = 'Q_S'; set(gca,'ytick',[0:1.2:4.800]);
set(gca,'xtick',[0:1150:2307.4]); xlim([0 2.3074e+03]); xlabel('d (m)');
  3 件のコメント
Nisar Ahmed
Nisar Ahmed 2022 年 7 月 14 日
@Rik I am trying caxis but error appears, can you help to write the code, how can I use it.
Nisar Ahmed
Nisar Ahmed 2022 年 7 月 14 日
I solved the problem as
h1 = colorbar;
h1.Limits = [2.1465 2.6929];

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

回答 (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