フィルターのクリア

I am getting a colorbar with uniform color. I want there to be variations so the distribution makes sense.

1 回表示 (過去 30 日間)
The P matrix varies from 1 to 2, however the returned figure shows one square with one uniform color. it would be a great help, if i could have a range of colors in that range(1 to 2) to show the distribution.
imshow(P,'InitialMagnification',2000)
colb = colorbar;
set(colb, 'ylim', [1 2])
  1 件のコメント
Sattik Basu
Sattik Basu 2017 年 11 月 26 日
right now, it shows completely white. for instance if i use 'jet', it shows completely blue.

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

採用された回答

Walter Roberson
Walter Roberson 2017 年 11 月 26 日
imshow(P, [], 'InitialMagnification',2000)
  4 件のコメント
Walter Roberson
Walter Roberson 2017 年 11 月 26 日
colormap(jet) after the imshow() call.
Or... you could instead
imagesc(P);
colormap(jet);
This will not mess up nearly as many settings as imshow() will.
Sattik Basu
Sattik Basu 2017 年 11 月 26 日
That imagesc command worked. thank you again.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by