MATLAB: Graph and conncomp examples

conncompgraph

In the example given for conncomp it has this:
graph([1 1 4],[2 3 5],[1 1 1],6);
I do not understand how this leads to the graph which is displayed. The documentation for graph is not clear about this either. Can anyone explain how graph actually operates in this case in a really simple way?

Best Answer

G=graph([1 1 4],[2 3 5],[1 1 1],6);
plot(G);
3456.png