function iris_subplots ( )

%*****************************************************************************80
%
%% IRIS_SUBPLOTS makes a plot of a 4x4 array of subplots of Iris data.
%
%  Discussion:
%
%    4 data values are available for multiple specimens of 3 varieties
%    of Iris.  These data values are the sepal length, sepal width, 
%    petal length, and petal width.
%
%    It is desired to create, for each pair of data values, a scatter plot.
%
%    By identifying the data for each variety by a separate color, it is
%    possible to detect patterns in the data.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 July 2018
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'IRIS_SUBPLOTS:\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  For each of 3 varieties of iris, a number of specimens\n' );
  fprintf ( 1, '  have been collected.  For each specimen, measurements\n' );
  fprintf ( 1, '  made of sepal length, sepal width, petal length and\n' );
  fprintf ( 1, '  petal width.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Create a 4x4 array of scatter plots that compare each\n' );
  fprintf ( 1, '  pair of values.  Moreoever, use colors to distinguish the\n' );
  fprintf ( 1, '  data belonging to each of the three varieties.\n' );
%
%  Read the three sets of data.
%
  setosa = load ( 'iris_setosa_data.txt' );
  versicolor = load ( 'iris_versicolor_data.txt' );
  virginica = load ( 'iris_virginica_data.txt' );

  label = { 'Sepal len', 'Sepal wid', 'Petal len', 'Petal wid' };
%
%  Clear the figure area.
%
  clf ( );
%
%  Draw the K-th plot, comparing value I versus value J.
%
  k = 0;
  for i = 1 : 4
    for j = 1 : 4
      k = k + 1;
      subplot ( 4, 4, k );

      axis ( 'square' );
      hold ( 'on' );
        scatter ( setosa(:,i), setosa(:,j), 10, 'r', 'filled' );
        scatter ( versicolor(:,i), versicolor(:,j), 10, 'g', 'filled' );
        scatter ( virginica(:,i), virginica(:,j), 10, 'b', 'filled' );
        xlabel ( label(i) );
        ylabel ( label(j) );
        set ( gca, 'Xtick', [] );
        set ( gca, 'Ytick', [] );
      hold ( 'off' );

    end
  end

  pause ( 5 )
%
%  Save graphics to a file.
%
  filename = 'iris_subplots.png';
  print ( '-dpng', filename );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics file saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'iris_subplots:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  return
end
