function track_bar ( )

%*****************************************************************************80
%
%% TRACK_BAR bar plots and labels some eye tracking data.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    28 April 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'TRACK_BAR:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Read a text file containing durations\n' );
  fprintf ( 1, '  representing results of an eye-tracking experiment.\n' );
  fprintf ( 1, '  Make a bar plot of the results, with labeled bars.\n' );
%
%  Set the labels.
%  For an array of text strings, we need to use a cell array,
%  delimited by '{' and '}'.
%
  labels = {
    'anger',
    'disgust',
    'fear',
    'happy',
    'sad',
    'surprise' };
%
%  Read the data file.
%
  duration = load ( 'track_data.txt' );
%
%  Make a bar plot.
%
  bar ( duration )
  set ( gca, 'xticklabel', labels );
  grid ( 'on' )
  xlabel ( '<-- Eye Region -->', 'FontSize', 16 )
  ylabel ( '<-- Duration (msec) -->', 'FontSize', 16 )
  title ( 'Fixation Duration to Eye Region', 'FontSize', 24 )
%
%  Force the Y axis to 2100.
%
  ylim ( [ 0, 2100 ] )
%
%  Save a snapshot of the plot.
%
  filename = 'track_bar.png';
  print ( '-dpng', filename )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'TRACK_BAR:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
