function cc_levels_constrained_display ( q_max, alpha, level_min, level_max )

%*****************************************************************************80
%
%% cc_levels_constrained_display() displays grids generated by cc_levels_constrained().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 January 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real Q_MAX, the maximum values of
%    Q, the sum of the weighted orders in each spatial coordinate.
%
%    real ALPHA(2)
%
%    integer LEVEL_MIN(2)
%
%    integer LEVEL_MAX(2)
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'CC_LEVELS_CONSTRAINED_DISPLAY:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Display the 2D Clenshaw-Curtis grids\n' );
  fprintf ( 1, '  generated by CC_LEVELS_CONSTRAINED.\n' );

  dim_num = 2;

  if ( q_max < dim_num )
    fprintf ( 1, '\n' );
    fprintf ( 1, '  We require DIM_NUM <= Q_MAX!\n' );
    return
  end
%
%  Compute data.
%
  [ grid_num, point_num ] = cc_levels_constrained_size ( dim_num, ...
    q_max, alpha, level_min, level_max );
    
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of grids is %d\n', grid_num );
  fprintf ( 1, '  Number of points is %d\n', point_num );

  [ grid_level, grid_point ] = cc_levels_constrained ( dim_num, ...
    q_max, alpha, level_min, level_max, grid_num, point_num );

  figure ( )

  clf
%
%  We have to name the axes in order to control the grid.
%
  axes_handle = axes;
%
%  Plot the points.
%
  handle = scatter ( grid_point(1,:), grid_point(2,:), 'filled' );
%
%  Force the plotting region to be square, not rectangular.
%
  axis square
%
%  Request grid lines.
%
  grid on
%
%  Specify the location of the grid lines, and suppress labeling.
%
  set ( axes_handle, 'xtick', [ -1, -.75, -.5, -.25, 0, .25, .50, .75, 1] );
  set ( axes_handle, 'xticklabel', [] );
  set ( axes_handle, 'ytick', [ -1, -.75, -.5, -.25, 0, .25, .50, .75, 1] );
  set ( axes_handle, 'yticklabel', [] );
%
%  Make the plotting region slightly bigger than the data.
%
  axis ( [ -1.1, 1.1, -1.1, 1.1 ] )
%
%  Title
%
  s = sprintf ( 'ALPHA = [ %f, %f]', alpha(1), alpha(2) );
  title ( s );

  return
ed
