function ci_plot ( )

%*****************************************************************************80
%
%% ci_plot() plots ci().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 August 2025
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ci_plot():\n' );
  fprintf ( 1, '  ci() evaluates the cosine integral function.\n' );

  a = -10.0;
  b =  10.0;
  nplot = 101;
  x = linspace ( a, b, nplot );
  y = zeros ( nplot, 1 );
  for i = 1 : nplot
    y(i) = ci ( x(i) );
  end

  clf ( );
  hold ( 'on' );
    plot ( x, y, 'b-', 'linewidth', 2 );
    plot ( [a,b], [0,0], 'k-', 'linewidth', 2 );
    ymin = min ( y );
    ymax = max ( y );
    plot ( [0, 0], [ymin,ymax], 'k-', 'linewidth', 2 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<--- X --->' );
  ylabel ( '<--- Ci(x) --->' );
  title ( 'The cosine integral function' );
  filename = 'ci_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

