function temperature_slice_ginput ( )

%% temperature_slice_ginput plots t(x,y) on a line set by ginput.

%
%  Close all old graphics figures.
%
  close ALL
%
%  Display the contour plot.  User must pick two points.
%
  figure ( 1 )

  k = 4;
  [ X, Y ] = temperature_grid ( k );
  T = temperature ( X, Y );
  title_string = ( 'Click on two points' );
  temperature_contour ( X, Y, T, title_string );

  [ x1x2, y1y2 ] = ginput ( 2 );

  hold on
  plot ( x1x2, y1y2, 'r-', 'Linewidth', 3 );
  hold off
  print ( '-djpeg', 'temperature_slice_ginput_2d.jpg' );
%
%  Draw the plot in a new figure.
%
  figure ( 2 )

  xvec = linspace ( x1x2(1), x1x2(2), 101 );
  yvec = linspace ( y1y2(1), y1y2(2), 101 );

  zvec = temperature ( xvec, yvec );

  plot ( xvec, zvec, 'Linewidth', 3 );
  xlabel ( '(X1,Y1) <--> (X2,Y2)' );
  ylabel ( '<-- T(X,Y) -->' );
  title ( 'Temperature T(X,Y) along a Line', 'Fontsize', 24 );
  grid on
  print ( '-djpeg', 'temperature_slice_ginput.jpg' );

  return
end
