フィルターのクリア

How to define color of country by a vector?

1 回表示 (過去 30 日間)
Ali Nouri
Ali Nouri 2020 年 1 月 7 日
コメント済み: Ali Nouri 2020 年 1 月 8 日
Basically, I have a vector with 31 value, and each value represent a country in europe. These value are between 1 and -1.
A colormap is made, which tells you, if the value is between 0.2 and 1 then color corresponding color to these values are red and if -0.2 to -1 the related color to these values are blue and the color for between values are green.
Now how can i use this colormap to make plot of europe map. where fx if germany has 0.3 as value then color of this country shall be red or if spain has -0.8 as value then spain color need be blue?
  2 件のコメント
darova
darova 2020 年 1 月 7 日
編集済み: darova 2020 年 1 月 7 日
What have you tried already?
What about this simple solution?
if 0.2<v(i) && v(i)<1
color = 'red';
end
Ali Nouri
Ali Nouri 2020 年 1 月 8 日
I have tried facecolor and geshow.

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

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