coloring node and edge of a graph
Show older comments
I have a graph with values assigned to nodes and edges,
t = 1:4;
h = 2:5;
g = graph(t,h);
plot(g)
g.Edges.value = [10; 20; 20; 100];
g.Nodes.value = [0.3; 0.564; 12; 1; 0.005];
I would like to know whether there is an option of coloring the nodes and edges based on the values.
Accepted Answer
More Answers (1)
madhan ravi
on 24 Dec 2018
0 votes
Easy way create a handle to the graph and just use dot indexing and assign the color for instance red , green .. blabla
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!