How do you plot a circular colour map for just one variable?

I have just one variable, refractive index, that i want to plot on a circular colour map. (see attached photo for an example of what im trying to do).

回答 (1 件)

KSSV
KSSV 2022 年 6 月 14 日

0 投票

Z = randi(20,25) ;
[m,n] = size(Z) ;
r = linspace(0,1,n) ;
th = linspace(0,2*pi,m) ;
[R,T] = meshgrid(r,th) ;
X = R.*cos(T) ;
Y = R.*sin(T) ;
pcolor(X,Y,Z)
axis equal
colormap(gray)

カテゴリ

ヘルプ センター および File ExchangeColor and Styling についてさらに検索

製品

リリース

R2019b

質問済み:

2022 年 6 月 14 日

回答済み:

2022 年 6 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by