In a pcolor plot, how do I make values with 0 blank or set the color scheme to a set range?

20 ビュー (過去 30 日間)
Basically, I need to be able to set the the color scheme to a range so I can see certain values.
I have measurements that are about .1700, but they vary by about .001 and I want to see that variation. The problem is that I have 0 values (for formatting reasons) and they make it so I can't see the variation.
I would like to be able to set a range for the colors.
Red = max value
blue = min value -= 0

採用された回答

Miro
Miro 2012 年 7 月 19 日
The easiest way to go is to turn all zeros into NaN's (not a number) like
Data(Data==0)=NaN;
Then they dont appear in the plot. otherwise you have to use the colormap editor (rightklick on the colormap -> colormapeditor). There you can shift the arrows and change the colors. Afterwards you can save the colormap by
Colmap = colormap;
and use the scheme again in another plot like
colormap(Colmap);
  3 件のコメント
Miro
Miro 2012 年 7 月 19 日
編集済み: Miro 2012 年 7 月 19 日
yes, but it is generally faster.
Andrew
Andrew 2012 年 7 月 19 日
Yeah. I didn't know that function existed. That will make the rest of the program a lot faster.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by