%% Adjust GraphPlot Properties
% Create and plot a directed graph. Specify an output argument to plot to return a handle to the GraphPlot object.

s = [1 1 1 2 2 3 3 4 5 5 6 7 7 8 8 9 10 11];
t = [2 3 10 4 12 4 5 6 6 7 9 8 10 9 11 12 11 12];
G = digraph(s,t)

%

p = plot(G)

%
% Change the color and marker of the nodes.

p.Marker = 's';
p.NodeColor = 'r';

%
% Increase the size of the nodes.

p.MarkerSize = 7;

%
% Change the line style of the edges.

p.LineStyle = '--';

%
% Change the x and y coordinates of the nodes.

p.XData = [2 4 1.5 3.5 1 3 1 2.1 3 2 3.1 4];
p.YData = [3 3 3.5 3.5 4 4 2 2 2 1 1 1];

% Copyright 2015 The MathWorks, Inc.