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

4 visualizaciones (últimos 30 días)
aman verma
aman verma el 14 de Jun. de 2022
Respondida: KSSV el 14 de Jun. de 2022
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).

Respuestas (1)

KSSV
KSSV el 14 de Jun. de 2022
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)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by