%% Change Layout of Graph
% Create and plot a graph using the 'layered' layout.

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

%
% Change the layout of the graph to use the 'subspace' method.

layout(h,'subspace')

% Copyright 2015 The MathWorks, Inc.