%% Graph Layout Based on Structure
% Create and plot a graph using the 'force' layout.

s = [1 1 1 1 1 6 6 6 6 6];
t = [2 3 4 5 6 7 8 9 10 11];
G = graph(s,t);
h = plot(G,'Layout','force');

%
% Change the layout to be the default that plot determines based on the structure and properties of the graph. The result is the same as using plot(G).

layout(h)

% Copyright 2015 The MathWorks, Inc.