How to convert the graph below in to heatmap?
Show older comments
I have the graph below. It was plotted using the code below:
%% matrix (:,4) is the weight of the corresponding matrix(:1:2) branches. Ignore matrix(:,3).
nodes = [];
for i = 1:1:size(matrix,1)
if matrix(i,4) <= 10000
nodes = [nodes,matrix(i,1:2)];
end
end
nodes_cellarray{:} = nodes;
set(figure, 'Visible', 'on');
Graph = graph(matrix(:,1),matrix(:,2));
plot_array = plot(Graph, 'layout', 'auto');
% plot_array.EdgeColor = 'red';
highlight(plot_array,nodes_cellarray{:},'EdgeColor','r','NodeColor','r','LineWidth',4);
I have attached the matrix23.xlsx file that has the matrix 'matrix' used above.

2 Comments
Jay Vaidya
on 1 Jan 2020
Deepak Kumar
on 3 Jan 2020
Refer the below MATLAB documentation link to get more insight about "heatmap" function
Accepted Answer
More Answers (1)
Jay Vaidya
on 5 Jan 2020
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
