function log_plots ( )

%*****************************************************************************80
%
%% LOG_PLOTS displays the PDF for Log(U) and U.
%
%  Discussion:
%
%    We expect the log of U to be evenly distributed between U/2
%    and 2*U.  What does that imply for the PDF of U?  The second
%    plot answers this question.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 March 2013
%
%  Author:
%
%    John Burkardt
%
  figure ( 1 );
  s1 = 5 - log ( 2.0 );
  s2 = 5;
  s3 = 5 + log ( 2.0 );
  s = linspace ( s1, s3, 101 );
  fs(1:101) = 1 / log ( 4.0 );
  plot ( s, fs, 'r-', 'Linewidth', 3 );
  hold on
  fs1 = 1 / log ( 4.0 );
  fs2 = 1 / log ( 4.0 );
  fs3 = 1 / log ( 4.0 );
  plot ( [ s(1:10:101) ], [fs(1:10:101) ], 'k.', 'Markersize', 35 );
  grid on;
  xlabel ( '<---S=Log(U)--->', 'Fontsize', 24 );
  ylabel ( '<---PDF(S)--->', 'Fontsize', 24 );
  title ( 'Uniform PDF for S = Log(U),', 'Fontsize', 24 ) 
  print ( '-dpng', 'log_plot1.png' );

  hold off

  figure ( 2 );
  u1 = exp ( s1 );
  u2 = exp ( s2 );
  u3 = exp ( s3 );
  u = linspace ( u1, u3, 101 );
  fu = 1 ./ u / log ( 4.0 );
  fu1 = 1 / u1 / log ( 4.0 );
  fu2 = 1 / u2 / log ( 4.0 );
  fu3 = 1 / u3 / log ( 4.0 );
  plot ( u, fu, 'r-', 'Linewidth', 3 );
  hold on
  plot ( [ u(1:10:101) ], [ fu(1:10:101) ], 'k.', 'Markersize', 35 );
  grid on;
  xlabel ( '<---U=exp(S)--->', 'Fontsize', 24 );
  ylabel ( '<---PDF(U)--->', 'Fontsize', 24 );
  title ( 'Corresponding PDF for U = exp(S),', 'Fontsize', 24 ) 
  print ( '-dpng', 'log_plot2.png' );

  hold off

  return
end

