As shown below, I have a graph. Inside each vertex point (i.e. circle) is a number. I prepare this graph as such. First I place a circle on the coordinates of each vertex using the following code:
plot(vertexCoords(1,:),vertexCoords(2,:),'o',...
'MarkerFaceColor',[0.90 0.90 0.90],...
'MarkerSize',30,'MarkerEdgeColor','k','LineWidth',2);
Then, I overlay a text object as follows:
text(vertexCoords(1,:),vertexCoords(2,:),num2cell(valueVector),...
'HorizontalAlignment','center');
I would like to choose a certain colormap
, and have the color of each circle be proportional to the number in the circle (the number can range from 0 to 1). How do I go about doing this?