t = [1 1 1 1];h = [2 3 4 5];g = graph(t,h);p = plot(g);g.Edges.value = [10; 20; 20; 100];g.Nodes.value = [0.3; 0.564; 12; 1; 0.005];g.Nodes.NodeColors = g.Nodes.value;g.Edges.EdgeColors = g.Edges.value;p.NodeCData = g.Nodes.NodeColors;p.EdgeCData = g.Edges.EdgeColors;q= plot(g,'NodeCData',g.Nodes.NodeColors);colorbar
t is the source node as input and h is demand node as output. I want to two different colors for input and output. But I don't find correct way. Plz help me to solve it.
Best Answer