function tsp_display ( prefix, n, x )

%*****************************************************************************80
%
%% tsp_display() plots cities and a tour connecting them.
%
%  Discussion:
%
%    If a "round trip" is desired, then the x2 array must repeat the
%    first city at the end.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 June 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    string prefix: a string that defines the name of
%    the problem.  It is also used to create file names needed for
%    input to gnuplot.
%
%    integer n: the number of cities.
%
%    real x(n,2): the x and y coordinates of the cities.
%
  clf ( );
  hold ( 'on' );
    plot ( x(:,1), x(:,2), 'r-', 'LineWidth', 3 );
    plot ( x(:,1), x(:,2), 'm.', 'MarkerSize', 20 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- Y -->' );
  title ( prefix );
  filename = sprintf ( '%s.png', prefix );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  close ( );

  return
end

