function web_digraph ( )

%*****************************************************************************80
%
%% web_digraph() plots a web of connections as a directed graph.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 May 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'web_digraph():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  Plot a web of connections as a directed graph.\n' );
%
%  S is the list of start nodes,
%  T are the terminal nodes.
%
  s = [ 1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 6 ];
  t = [ 5, 6, 1, 3, 4, 4, 5, 5, 1, 6, 4 ];  
%
%  Create a digraph from S and T.
%
  G = digraph ( s, t );
%
%  Set up optional edge and node labels.
%
  eLabels = { ...
    '0.1', '0.9', ...
    '0.3', '0.4', '0.3', ...
    '0.6', '0.4', ...
    '1.0', ...
    '0.2', '0.8', ...
    '1.0' };

  nLabels = { 'Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta' };
%
%  Plot the digraph, and specify lots of options.
%
  plot ( G, ...
    'Layout', 'circle', ...
    'EdgeLabel', eLabels, ...
    'NodeLabel', nLabels, ...
    'LineWidth', 2, ...
    'MarkerSize', 10, ...
    'ArrowSize', 20 );

  title ( 'A web of directed connections', 'Fontsize', 16 );
%
%  Save a copy.
%
  filename = 'web_digraph.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'web_digraph():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
 
  return
end

