function normal_plots ( )

%*****************************************************************************80
%
%% NORMAL_PLOTS plots PDF, CDF and inverse CDF for normal density.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    25 February 2013
%
%  Author:
%
%    John Burkardt
%

%
%  PDF
%
  figure ( 1 )
  x = linspace ( -3.0, 3.0, 101 );
  y = exp ( - x.^2 / 2 ) / sqrt ( 2.0 * pi );
  plot ( x, y, 'r-', 'LineWidth', 5 );
  grid on
  title ( 'Normal PDF', 'Fontsize', 24 );
  xlabel ( '<=== X ===>', 'Fontsize', 24 );
  ylabel ( '<=== rho(X) ===>', 'Fontsize', 24 );
% axis ( [-0.5, 1.5, -0.5, 1.5 ] );
  print ( '-dpng', 'normal_pdf.png' );
%
%  CDF
%
  figure ( 2 )
  x = linspace ( -3.0, 3.0, 101 );
  y = 0.5 * ( 1.0 + erf ( x / sqrt ( 2 ) ) );
  plot ( x, y, 'r-', 'LineWidth', 5 );
  grid on
  title ( 'Normal CDF = (1+erf(x/sqrt(2)))/2', 'Fontsize', 24 );
  xlabel ( '<=== X ===>', 'Fontsize', 24 );
  ylabel ( '<=== cdf(X) ===>', 'Fontsize', 24 );
  axis ( [ -3.0, 3.0, 0.0, 1.1 ] );
  print ( '-dpng', 'normal_cdf.png' );
%
%  invCDF
%
  figure ( 3 )
  x = linspace ( 0.001, 0.999, 101 );
  y = sqrt ( 2.0 ) * erfinv ( 2.0 * x - 1.0 );
  plot ( x, y, 'r-', 'LineWidth', 5 );
  grid on
  title ( 'Normal invCDF=sqrt(2)*erfinv(2 cdf-1)', 'Fontsize', 24 );
  xlabel ( '<=== cdf(X) ===>', 'Fontsize', 24 );
  ylabel ( '<=== X ===>', 'Fontsize', 24 );
  axis ( [-0.1, 1.1, -3.0, 3.0 ] );
  print ( '-dpng', 'normal_invcdf.png' );

  return
end

