function cc_display_test ( )

%*****************************************************************************80
%
%% cc_display_test() tests cc_display().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 January 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../cc_display' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cc_display_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  Test cc_display().\n' );

  order_1d = [ 2, 16 ];
  cc_grid_display ( order_1d );
  filename = 'cc_grid_2x16.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  order_1d = [ 5, 9 ];
  cc_grid_display ( order_1d );
  filename = 'cc_grid_5x9.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  for i = 2 : 6
    q_min = i;
    q_max = i;
    cc_grids_minmax_display ( q_min, q_max );
    filename = sprintf ( 'cc_grids_minmax_%dto%d.png', q_min, q_max );
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end

  for i = 0 : 6
    level_min = i;
    level_max = i;
    cc_levels_minmax_display ( level_min, level_max );
    filename = sprintf ( 'cc_levels_minmax_%dto%d.png', q_min, q_max );
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end

  q_max = 13;
  alpha = [ 2.0, 3.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 5, 5 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot1.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 16;
  alpha = [ 2.0, 3.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 5, 5 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 2.0, 3.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 5, 5 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot3.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 2.0, 3.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 8, 8 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot4.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 5.0, 2.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 8, 8 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot5.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 30;
  alpha = [ 5.0, 2.0 ];
  order_min = [ 1, 1 ];
  order_max = [ 8, 8 ];
  cc_grids_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_grids_constrained_plot6.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 13;
  alpha = [ 2.0, 3.0 ];
  level_min = [ 1, 1 ];
  level_max = [ 5, 5 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot1.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 16;
  alpha = [ 2.0, 3.0 ];
  level_min_min = [ 1, 1 ];
  level_min_max = [ 5, 5 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 2.0, 3.0 ];
  level_min_min = [ 1, 1 ];
  level_min_max = [ 5, 5 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot3.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 2.0, 3.0 ];
  level_min_min = [ 1, 1 ];
  level_min_max = [ 8, 8 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot4.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 20;
  alpha = [ 5.0, 2.0 ];
  level_min_min = [ 1, 1 ];
  level_min_max = [ 8, 8 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot5.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  q_max = 30;
  alpha = [ 5.0, 2.0 ];
  level_min_min = [ 1, 1 ];
  level_min_max = [ 8, 8 ];
  cc_levels_constrained_display ( q_max, alpha, order_min, order_max );
  filename = 'cc_levels_constrained_plot6.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'cc_display_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../cc_display' )

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

