4 views (last 30 days)

Show older comments

I have graph below that was generated by the following code:

Also the data.xlsx has the matrix used below.

nodes = [];

new_matrix(:,1:2) = matrix(:,1:2);

for i = 1:1:size(matrix,1)

if matrix(i,4) <= 10000

nodes = [nodes,matrix(i,1:2)];

% new_matrix(i,1:2) = 0;

new_matrix(i,3) = 1;

else

% new_matrix(i,1:2) = 0;

new_matrix(i,3) = 0;

end

end

%

nodes_cellarray{:} = nodes;

set(figure, 'Visible', 'on');

G = graph(matrix(:,1),matrix(:,2));

plot_array = plot(G, 'layout', 'auto');

% plot_array.NodeColor = 'white';

highlight(plot_array,nodes_cellarray{:},'EdgeColor','r','NodeColor','red','LineWidth',4);

I get a graph plot as shown here:

I am aiming to color this graph such that it should look like the colorplot below:

This is a MATLAB generated plot from a research artcle.

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

Start Hunting!