function som_stats_plot(csS,plottype,varargin)
%SOM_STATS_PLOT Plots of data set statistics.
%
% som_stats_plot(csS, plottype, [argID, value, ...])
%
% som_stats_plot(csS,'stats')
% som_stats_plot(csS,'stats','p','vert','color','r')
%
% Input and output arguments ([]'s are optional):
% csS (cell array) of statistics structs
% (struct) a statistics struct
% plottype (string) some of the following
% 'hist' histogram
% 'box' min, max, mean, and std shown as a boxplot
% 'stats' both histogram (with black) and the boxplot
% [argID, (string) See below. The values which are unambiguous can
% value] (varies) be given without the preceeding argID.
%
% Here are the valid argument IDs and corresponding values. The values which
% are unambiguous (marked with '*') can be given without the preceeding argID.
% 'counts' *(string) 'c' (for counts, the default) or 'p' (for percentages)
% 'color' (vector) size 1 x 3, color to be used
% (string) a color string
% 'title' (string) 'on' (default) or 'off'
% 'orientation' *(string) 'horiz' or 'vert' (default): orientation for the
% bin values (horizontally or vertically)
%
% See also SOM_STATS, SOM_STATS_TABLE, SOM_TABLE_PRINT, SOM_STATS_REPORT.
% Contributed to SOM Toolbox 2.0, December 31st, 2001 by Juha Vesanto
% Copyright (c) by Juha Vesanto
% http://www.cis.hut.fi/projects/somtoolbox/
% Version 2.0beta juuso 311201
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% arguments
% statistics
if isstruct(csS), csS = {csS}; end
% default values
useprob = 0;
color = [0 0 1];
showtitle = 1;
horiz = 0;
% varargin
i=1;
while i<=length(varargin),