%% Add Text Labels to Graph Edges
% Create and plot a graph.

s = [1 1 2 2 3];
t = [2 3 3 4 4];
G = graph(s,t);
h = plot(G);

%
% Add text labels to three of the five graph edges.

labelText = {'ABC' 'DEF' 'GHI'};
labeledge(h,[1 1 2],[2 3 3],labelText)

% Copyright 2015 The MathWorks, Inc.