function interp_plot ( xd, yd, xi, yi, filename )

%*****************************************************************************80
%
%% interp_plot() plots the profile data using splines.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 January 2025
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Cleve Moler,
%    Numerical Computing with MATLAB,
%    SIAM, 2004,
%    ISBN13: 978-0-898716-60-3,
%    LC: QA297.M625. 
%
%  Input:
%
%    real xd(nd), yd(nd): data to be interpolated.
%
%    real xi(ni), yi(ni): the interpolated values.
%
%    string filename: the name of a file in which to save the plot.
%

%
%  Display the parameterized spline U(T), V(T):
%
  clf ( );
  hold ( 'on' );
    plot ( xi, yi, 'lineWidth', 3 );
    plot ( xd, yd, 'k.', 'markersize', 20 );
  hold ( 'off' );
  axis ( 'equal' );
  grid ( 'on' );
  legend ( 'Spline', 'Data' );
  title ( 'Spline interpolant to profile data' )

  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

