MATLAB: Creating a heat map that would color different sectors of a circle

colormapplot

Hi all,
I have plotted 197 circles each with 3 sectors on a single plot. I have a value (a number between 1 and 30) associated with each sector and would like to create a heat type map that would color each sector of a circle based on its associated value. The values are stored in 3×197 matrix.
Any help is much appreciated.

Best Answer

Are these circles on an image? You forgot to show your plot/image so we have to just guess. Anyway, assuming the circle values are in an image with values rounded to the nearest integer (1 to 30), you can just apply a colormap to the figure
colorMap = jet(30); % Create a colormap with 30 different colors.
% colorMap is just a numerical array at this point,
% it's not been sent to the display adapter yet. We'll do that next.
colormap(colorMap); % Apply the colorMap to our figure.