Index: /issm/trunk/src/m/qmu/plot/plot_boxplot.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_boxplot.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_boxplot.m	(revision 7398)
@@ -106,6 +106,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_cdf.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_cdf.m	(revision 7398)
+++ /issm/trunk/src/m/qmu/plot/plot_cdf.m	(revision 7398)
@@ -0,0 +1,370 @@
+%
+%  plot the CDF of the responses.
+%
+%  []=plot_cdf(dresp      ,params)
+%  []=plot_cdf(dresp,descr,params)
+%
+%  where the required input is:
+%    dresp         (structure array, responses)
+%      or
+%    dresp         (structure array, responses)
+%    descr         (cell array, list of response descriptions desired)
+%
+%  the required fields of dresp are:
+%    descriptor    (char, description)
+%    cdf(:,4)      (double matrix, CDF table)
+%
+%  the optional input is:
+%    params        (string/numeric, parameter names and values)
+%
+%  where the optional parameters are:
+%    cplot         (char, 'p'/'r'/'g' to plot prob/reli/genrel)
+%    xmin          (numeric, minimum of x-axis)
+%    xmax          (numeric, maximum of x-axis)
+%    xgrid         (char, 'on' to turn on x-grid lines)
+%    ymin1         (numeric, minimum of y-axis)
+%    ymax1         (numeric, maximum of y-axis)
+%    ygrid1        (char, 'on' to turn on y-grid lines)
+%    ynorm         (char, 'yes' to use normal probability y-axis)
+%    yprob         (double vector, list of probabilities for y-axis)
+%    cline1        (char, 'off'/'no'/'-'/'--'/':'/etc. to change lines)
+%    lwidth1       (numeric, line width in points, default 0.5)
+%    cmark1        (char, 'on'/'yes'/'+'/'o'/'*'/etc. to change markers)
+%    msize1        (numeric, marker size in points, default 6)
+%    ymin2         (numeric, minimum of y-axis)
+%    ymax2         (numeric, maximum of y-axis)
+%    ygrid2        (char, 'on' to turn on y-grid lines)
+%    cline2        (char, 'off'/'no'/'-'/'--'/':'/etc. to change lines)
+%    lwidth2       (numeric, line width in points, default 0.5)
+%    cmark2        (char, 'on'/'yes'/'+'/'o'/'*'/etc. to change markers)
+%    msize2        (numeric, marker size in points, default 6)
+%    pdfplt        (char, 'bar'/'line'/'off' for pdf plots)
+%    pdfleg        (char, 'off' to turn off pdf legends)
+%    cmap          (char or numeric, colormap definition)
+%
+%  for each response in the input array, this function plots
+%  a line plot of the CDF and annotates it with the description.
+%
+%  this data would typically be contained in the dakota output
+%  file and read by dakota_out_parse.
+%
+%  "Copyright 2010, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+function []=plot_cdf(varargin)
+
+if ~nargin
+    help plot_cdf
+    return
+end
+
+%%  process input data and assemble into matrices as needed
+
+%  responses
+
+iarg=1;
+if isstruct(varargin{iarg})
+    dresp=varargin{iarg};
+    iarg=iarg+1;
+    
+%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
+    if iarg <= nargin && iscell(varargin{iarg})
+        dresp=struc_desc(dresp,varargin{iarg});
+        iarg=iarg+1;
+    end
+else
+    error(['''' inputname(iarg) ''' is not a structure.']);
+end
+
+%  parameters
+
+while (iarg <= nargin-1)
+    if ischar(varargin{iarg})
+        if ~isempty(strmatch(varargin{iarg},...
+                {'cplot','xmin','xmax','xgrid',...
+                 'ymin1','ymax1','ygrid1','ynorm','yprob',...
+                 'cline1','lwidth1','cmark1','msize1',...
+                 'ymin2','ymax2','ygrid2',...
+                 'cline2','lwidth2','cmark2','msize2',...
+                 'pdfplt','pdfleg','cmap'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
+    else
+        error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
+    end
+    iarg=iarg+2;
+end
+
+if ~exist('cplot','var') || strncmpi(cplot,'p',1)
+    cplot='Probabilit';
+    iplot=2;
+elseif strncmpi(cplot,'r',1)
+    cplot='Reliabilit';
+    iplot=3;
+elseif strncmpi(cplot,'g',1)
+    cplot='General Reliabilit';
+    iplot=4;
+end
+
+%  assemble data into matrices, based on parameters
+
+descr=cell (1,length(dresp));
+lcdfr=zeros(1,length(dresp));
+for i=1:length(dresp)
+    lcdfr(i)=size(dresp(i).cdf,1);
+end
+xdata=zeros(max(lcdfr),length(dresp));
+xdata(:,:)=NaN;
+ydata=zeros(max(lcdfr),length(dresp));
+ydata(:,:)=NaN;
+
+for i=1:length(dresp)
+    descr(i)=cellstr(dresp(i).descriptor);
+    if ~isempty(dresp(i).cdf)
+        xdata(1:lcdfr(i),i)=dresp(i).cdf(:,1);
+        if strncmpi(cplot,'p',1) && ...
+           exist('ynorm','var') && strncmpi(ynorm,'y',1)
+             ydata(1:lcdfr(i),i)=norminv(dresp(i).cdf(:,iplot),0,1);
+        else
+             ydata(1:lcdfr(i),i)=        dresp(i).cdf(:,iplot);
+        end
+    end
+end
+
+%%  draw the line plot
+
+%newplot();
+figure
+ax1=axes;
+
+if ~exist('cline1','var') || strncmpi(cline1,'on' ,2) || strncmpi(cline1,'y',1)
+    cline1='-';
+elseif strncmpi(cline1,'off',3) || strncmpi(cline1,'n',1)
+    cline1='none';
+end
+if ~exist('lwidth1','var')
+    lwidth1=0.5;
+end
+if ~exist('cmark1','var') || strncmpi(cmark1,'off',3) || strncmpi(cmark1,'n',1)
+    cmark1='none';
+elseif strncmpi(cmark1,'on' ,2) || strncmpi(cmark1,'y',1) || ...
+       (length(cmark1) > 1)
+    cmark1='+';
+end
+if ~exist('msize1','var')
+    msize1=6;
+end
+
+hl1=line(xdata,ydata,'Parent',ax1,'LineStyle',cline1,'LineWidth',lwidth1,...
+         'Marker',cmark1,'MarkerSize',msize1);
+
+%  set lines to have a continuous colormap
+
+if exist('cmap','var')
+    colormap(cmap)
+end
+
+cmap=colormap;
+for i=1:length(hl1)
+    if (length(hl1) > 1)
+        imap=round((i-1)/(length(hl1)-1)*(size(cmap,1)-1))+1;
+    else
+        imap=1;
+    end
+    set(hl1(i),'Color',cmap(imap,:))
+end
+    
+xlim('auto')
+[xlims]=xlim;
+if exist('xmin','var')
+    xlims(1)=xmin;
+end
+if exist('xmax','var')
+    xlims(2)=xmax;
+end
+xlim(xlims)
+if exist('xgrid','var') && strncmpi(xgrid,'on',2)
+    set(ax1,'XGrid','on')
+end
+if strncmpi(cplot,'p',1)
+    [ylims]=[0 1];
+else
+    ylim('auto')
+    [ylims]=ylim;
+end
+if exist('ymin1','var')
+    ylims(1)=ymin1;
+end
+if exist('ymax1','var')
+    ylims(2)=ymax1;
+end
+ylim(ylims)
+if exist('ygrid1','var') && strncmpi(ygrid1,'on',2)
+    set(ax1,'YGrid','on')
+end
+
+%  add the annotation
+
+if strncmpi(cplot,'p',1) && ...
+   exist('ynorm','var') && strncmpi(ynorm,'y',1)
+%  copied and adapted from matlab normplot function
+    if ~exist('yprob','var')
+        yprob = [0.001 0.003 0.01 0.02 0.05 0.10 0.25 0.5...
+                 0.75 0.90 0.95 0.98 0.99 0.997 0.999];
+    end
+
+%  matlab docs say str2mat is obsolete, so replace (and eliminate redundancy)
+%     label1= str2mat('0.001','0.003', '0.01','0.02','0.05','0.10','0.25','0.50');
+%     label2= str2mat('0.75','0.90','0.95','0.98','0.99','0.997', '0.999');
+%     label = [label1;label2];
+    label=cell(1,length(yprob));
+    for i=1:length(yprob)
+        label(i)=cellstr(num2str(yprob(i)));
+    end
+
+    tick  = norminv(yprob,0,1);
+    set(ax1,'YTick',tick,'YTickLabel',label);
+    ylim([tick(1) tick(end)])
+end
+
+title([cplot 'ies for Response Levels'])
+xlabel('Response Level')
+ylabel([cplot 'y'])
+
+hleg1=legend(ax1,descr(1:length(hl1)),'Location','NorthWest',...
+             'Color','none','Interpreter','none');
+
+%%  generate the probability distribution functions
+
+if ~exist('pdfplt','var') || ~strcmpi(pdfplt,'off')
+    xpdf =zeros(max(lcdfr)-1,length(dresp));
+    xpdf (:,:)=NaN;
+    ypdf =zeros(max(lcdfr)-1,length(dresp));
+    ypdf (:,:)=NaN;
+    xplot=zeros(2*max(lcdfr),length(dresp));
+    xplot(:,:)=NaN;
+    yplot=zeros(2*max(lcdfr),length(dresp));
+    yplot(:,:)=NaN;
+
+    for i=1:length(dresp)
+        descr(i)=cellstr([dresp(i).descriptor ' pdf']);
+        if ~isempty(dresp(i).cdf) && (lcdfr(i) > 1)
+            xpdf (1:lcdfr(i)-1,i)=(dresp(i).cdf(1:lcdfr(i)-1,1)+...
+                                   dresp(i).cdf(2:lcdfr(i)  ,1))/2;
+            ypdf (1:lcdfr(i)-1,i)=(dresp(i).cdf(2:lcdfr(i)  ,2)-...
+                                   dresp(i).cdf(1:lcdfr(i)-1,2))./...
+                                  (dresp(i).cdf(2:lcdfr(i)  ,1)-...
+                                   dresp(i).cdf(1:lcdfr(i)-1,1));
+            for j=1:lcdfr(i)-1
+                xplot(2*(j-1)+1,i)=dresp(i).cdf(j  ,1);
+                yplot(2*(j-1)+1,i)=ypdf (j,i);
+                xplot(2*(j-1)+2,i)=dresp(i).cdf(j+1,1);
+                yplot(2*(j-1)+2,i)=ypdf (j,i);
+            end
+        end
+    end
+    
+    if strcmpi(pdfplt,'line')
+        xplot=xpdf;
+        yplot=ypdf;
+    end
+
+%  draw the line plot
+
+%  (see "Using Multiple X- and Y-Axes" and "Overlaying Other
+%  Plots on Bar Graphs", or search on "YAxisLocation right")
+
+%     hold all
+%     hold on
+%     plot(edges,cdf)
+%     plotyy([],[],edges,cdf)
+
+%  ticks from the bar plot will show through on the right side,
+%  so make equal number of ticks for the line plot on right side
+
+    nytick=length(get(ax1,'YTick'));
+%     ylim('auto')
+%     [ylims]=ylim;
+    [ylims]=[0 ceil(max(max(yplot))/0.1-0.1)*0.1];
+    if exist('ymin2','var')
+        ylims(1)=ymin2;
+    end
+    if exist('ymax2','var')
+        ylims(2)=ymax2;
+    else
+        ylims(2)=ylims(1)+(nytick-1)/(nytick-1-1)*(ylims(2)-ylims(1));
+    end
+%     ylim(ylims)
+    ytinc =(ylims(2)-ylims(1))/(nytick-1);
+
+    ax2=axes('Position',get(ax1,'Position'),...
+             'XLim',get(ax1,'XLim'),...
+             'XTick',get(ax1,'XTick'),...
+             'YLim',ylims,...
+             'YTick',[ylims(1):ytinc:ylims(2)],...
+             'XAxisLocation','bottom','YAxisLocation','right',...
+             'Color','none','Layer','top');
+
+    if ~exist('cline2','var') || strncmpi(cline2,'on' ,2) || strncmpi(cline2,'y',1)
+        cline2='-';
+    elseif strncmpi(cline2,'off',3) || strncmpi(cline2,'n',1)
+        cline2='none';
+    end
+    if ~exist('lwidth2','var')
+        lwidth2=0.5;
+    end
+    if ~exist('cmark2','var') || strncmpi(cmark2,'off',3) || strncmpi(cmark2,'n',1)
+        cmark2='none';
+    elseif strncmpi(cmark2,'on' ,2) || strncmpi(cmark2,'y',1) || ...
+           (length(cmark2) > 1)
+        cmark2='+';
+    end
+    if ~exist('msize2','var')
+        msize2=6;
+    end
+
+    hl2=line(xplot,yplot,'Parent',ax2,'LineStyle',cline2,'LineWidth',lwidth2,...
+             'Marker',cmark2,'MarkerSize',msize2);
+
+%  set line property colors line property
+
+    cmap=colormap;
+    for i=1:length(hl2)
+        if (length(hl2) > 1)
+            imap=round((i-1)/(length(hl2)-1)*(size(cmap,1)-1))+1;
+        else
+            imap=1;
+        end
+        set(hl2(i),'Color',get(hl1(i),'Color'))
+     end
+
+%  add the annotation
+
+    ylabel('Probability Distribution Function');
+
+    if ~exist('cdfleg','var') || ~strcmpi(cdfleg,'off')
+% legend doesn't combine with bar chart above
+        hleg2=legend(ax2,descr(1:length(hl2)),'Location','NorthEast',...
+                     'Color','none','Interpreter','none');
+%         set(hleg2,'Color','white')
+    end
+
+    set(gcf,'PaperPositionMode','auto')
+%     hold off
+end
+
+end
Index: /issm/trunk/src/m/qmu/plot/plot_hist_norm.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_hist_norm.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_hist_norm.m	(revision 7398)
@@ -44,6 +44,8 @@
 %    ymin2         (numeric, minimum of cdf y-axis)
 %    ymax2         (numeric, maximum of cdf y-axis)
+%    nrmplt        (char, 'line' or 'off' to change nrm plots from 'bar')
 %    cdfplt        (char, 'off' to turn off cdf line plots)
 %    cdfleg        (char, 'off' to turn off cdf legends)
+%    cmap          (char or numeric, colormap definition)
 %
 %  for each response in the input array, this function
@@ -164,4 +166,9 @@
     end
     iarg=iarg+1;
+else
+    mu   =mean(sampr);
+    display('Using calculated means.')
+    sigma=std(sampr);
+    display('Using calculated standard deviations.')
 end
 
@@ -170,6 +177,14 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'hmin','hmax','hnint',...
+                 'ymin1','ymax1','ymin2','ymax2',...
+                 'nrmplt','cdfplt','nrmleg','cmap'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
@@ -206,14 +221,14 @@
 end
 
+ncol=size(sampr,2);
 if exist('mu','var') && exist('sigma','var')
-    ncol=size(sampr,2);
     for i=1:ncol
-        dbelow(ncol+i)=normcdf(edges(  1),mu(i),sigma(i));
-        dhistc(1:size(dhistc,1)-1,ncol+i)=...
+        dbelow(end+1)=normcdf(edges(  1),mu(i),sigma(i));
+        dhistc(1:size(dhistc,1)-1,end+1)=...
             normcdf(edges(2:end  ),mu(i),sigma(i))-...
             normcdf(edges(1:end-1),mu(i),sigma(i));
-        dabove(ncol+i)=norminv(edges(end),mu(i),sigma(i));
+        dabove(end+1)=norminv(edges(end),mu(i),sigma(i));
         if exist('descr','var')
-            descr(ncol+i)={[descr{i} ' norm']};
+            descr(end+1)={[descr{i} ' norm']};
         end
     end
@@ -222,16 +237,61 @@
 %  draw the bar plot
 
-%figure
-hl1=bar(edges(1:end-1),dhistc(1:end-1,:));
+figure
+if ~exist('nrmplt','var')
+    nrmplt='bar';
+end
+
+hold all
+% hl1=bar(edges(1:end-1),dhistc(1:end-1,1:2*ncol));
+% hl1=line(edges(1:end-1),dhistc(1:end-1,1:2*ncol));
+if     strncmpi(nrmplt,'b',1)
+    hl1=bar (edges(1:end-1),dhistc(1:end-1,1:2*ncol));
+elseif strncmpi(nrmplt,'l',1)
+    hl1=bar (edges(1:end-1),dhistc(1:end-1,1:1*ncol));
+    hl1(1*ncol+1:2*ncol)=...
+        line(edges(1:end-1),dhistc(1:end-1,1*ncol+1:2*ncol),...
+             'LineWidth',2);
+elseif strncmpi(nrmplt,'off',3)
+    hl1=bar (edges(1:end-1),dhistc(1:end-1,1:1*ncol));
+end
 ax1=gca;
+hold off
 
 %  set barseries properties for clarity
 
-if (length(hl1) > 1)
+if (ncol > 1) || strncmpi(nrmplt,'b',1)
     for i=1:length(hl1)
-        set(hl1(i),'BarWidth',1,'EdgeColor','none');
-    end
-end
-
+        if strcmpi(get(hl1(i),'Type'),'hggroup')
+            set(hl1(i),'BarWidth',1,'EdgeColor','none');
+        end
+    end
+end
+
+%  set bars and lines to have a continuous colormap
+%  (if barseries is "flat", must interpolate and round to colormap)
+
+if exist('cmap','var')
+    colormap(cmap)
+end
+
+cmap=colormap;
+for i=1:length(hl1)
+    if (length(hl1) > 1)
+        imap=round((i-1)/(length(hl1)-1)*(size(cmap,1)-1))+1;
+    else
+        imap=1;
+    end
+    if     strcmpi(get(hl1(i),'Type'),'hggroup')
+        if ischar(get(hl1(i),'FaceColor')) && ...
+           strcmpi(get(hl1(i),'FaceColor'),'flat')
+            set(hl1(i),'FaceColor',cmap(imap,:))
+        else
+            set(hl1(i),'FaceColor',get(hl1(i),'FaceColor'))
+        end
+    elseif strcmpi(get(hl1(i),'Type'),'line')
+        set(hl1(i),'Color',cmap(imap,:))
+    end
+end
+    
 xlim('auto')
 [xlims]=xlim;
@@ -256,5 +316,6 @@
 %  add the annotation
 
-if exist('cdfplt','var') && strcmpi(cdfplt,'off')
+if exist('cdfplt','var') && ...
+   (strncmpi(cdfplt,'off',3) || strncmpi(cdfplt,'n',1))
     title('Relative Frequency Histogram')
 else
@@ -265,5 +326,5 @@
 
 if exist('descr','var')
-    hleg1=legend(ax1,descr,'Location','NorthWest',...
+    hleg1=legend(ax1,descr(1:length(hl1)),'Location','NorthWest',...
                  'Color','none','Interpreter','none');
 else
@@ -273,5 +334,6 @@
 %%  generate the cumulative distribution functions
 
-if ~exist('cdfplt','var') || ~strcmpi(cdfplt,'off')
+if ~exist('cdfplt','var') || ...
+   (~strncmpi(cdfplt,'off',3) && ~strncmpi(cdfplt,'n',1))
 %     cdf=zeros(size(dhistc));
 %     cdf(1,:)=dhistc(1,:);
@@ -325,21 +387,25 @@
              'XAxisLocation','bottom','YAxisLocation','right',...
              'Color','none','Layer','top');
-    hl2=line(edges(1:end-1),cdf(1:end-1,:),'Parent',ax2);
-
-%  set line property colors to match barseries property
+    hl2=line(edges(1:end-1),cdf(1:end-1,1:length(hl1)),'Parent',ax2);
+
+%  set line property colors to match barseries or line property
 %  (if barseries is "flat", must interpolate and round to colormap)
 
     cmap=colormap;
     for i=1:length(hl2)
-        if ischar(get(hl1(i),'FaceColor')) && ...
-           strcmpi(get(hl1(i),'FaceColor'),'flat')
-            if (length(hl2) > 1)
-                imap=round((i-1)/(length(hl2)-1)*(size(cmap,1)-1))+1;
+        if (length(hl2) > 1)
+            imap=round((i-1)/(length(hl2)-1)*(size(cmap,1)-1))+1;
+        else
+            imap=1;
+        end
+        if     strcmpi(get(hl1(i),'Type'),'hggroup')
+            if ischar(get(hl1(i),'FaceColor')) && ...
+               strcmpi(get(hl1(i),'FaceColor'),'flat')
+                set(hl2(i),'Color',cmap(imap,:))
             else
-                imap=1;
+                set(hl2(i),'Color',get(hl1(i),'FaceColor'))
             end
-            set(hl2(i),'Color',cmap(imap,:))
-        else
-            set(hl2(i),'Color',get(hl1(i),'FaceColor'))
+        elseif strcmpi(get(hl1(i),'Type'),'line')
+            set(hl2(i),'Color',get(hl1(i),'Color'))
         end
     end
@@ -349,8 +415,9 @@
     ylabel('Cumulative Percent');
 
-    if ~exist('cdfleg','var') || ~strcmpi(cdfleg,'off')
+    if ~exist('cdfleg','var') || ...
+       (~strncmpi(cdfleg,'off',3) || ~strncmpi(cdfleg,'n',1))
 % legend doesn't combine with bar chart above
         if exist('cdescr','var')
-            hleg2=legend(ax2,cdescr,'Location','NorthEast',...
+            hleg2=legend(ax2,cdescr(1:length(hl2)),'Location','NorthEast',...
                          'Color','none','Interpreter','none');
 %             set(hleg2,'Color','white')
Index: /issm/trunk/src/m/qmu/plot/plot_hist_norm_ci.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_hist_norm_ci.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_hist_norm_ci.m	(revision 7398)
@@ -144,6 +144,14 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'hmin','hmax','hnint',...
+                 'ymin1','ymax1','ymin2','ymax2',...
+                 'nrmplt','ciplt','cdfplt','cdfleg','cmap'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
@@ -180,6 +188,6 @@
 end
 
+ncol=size(sampr,2);
 if exist('mu','var') && exist('sigma','var')
-    ncol=size(sampr,2);
     for i=1:ncol
         dbelow(end+1)=normcdf(edges(  1),mu(i),sigma(i));
@@ -250,17 +258,17 @@
 % hl1=bar(edges(1:end-1),dhistc(1:end-1,1:6*ncol));
 % hl1=line(edges(1:end-1),dhistc(1:end-1,1:6*ncol));
-if     strcmpi(nrmplt,'bar')
-    if     strcmpi(ciplt,'bar')
+if     strncmpi(nrmplt,'b',1)
+    if     strncmpi(ciplt,'b',1)
         hl1=bar (edges(1:end-1),dhistc(1:end-1,1:6*ncol));
-    elseif strcmpi(ciplt,'line')
+    elseif strncmpi(ciplt,'l',1)
         hl1=bar (edges(1:end-1),dhistc(1:end-1,1:2*ncol));
         hl1(2*ncol+1:6*ncol)=...
             line(edges(1:end-1),dhistc(1:end-1,2*ncol+1:6*ncol),...
                  'LineWidth',2);
-    elseif strcmpi(ciplt,'off')
+    elseif strncmpi(ciplt,'off',3) || strncmpi(ciplt,'n',1)
         hl1=bar (edges(1:end-1),dhistc(1:end-1,1:2*ncol));
     end
-elseif strcmpi(nrmplt,'line')
-    if     strcmpi(ciplt,'bar') || strcmpi(ciplt,'line')
+elseif strncmpi(nrmplt,'l',1)
+    if     strncmpi(ciplt,'b',1) || strncmpi(ciplt,'l',1)
         hl1=bar (edges(1:end-1),dhistc(1:end-1,1:1*ncol));
         hl1(1*ncol+1:2*ncol)=...
@@ -270,5 +278,5 @@
             line(edges(1:end-1),dhistc(1:end-1,2*ncol+1:6*ncol),...
                  'LineWidth',1);
-    elseif strcmpi(ciplt,'off')
+    elseif strncmpi(ciplt,'off',3) || strncmpi(ciplt,'n',1)
         hl1=bar (edges(1:end-1),dhistc(1:end-1,1:1*ncol));
         hl1(1*ncol+1:2*ncol)=...
@@ -276,5 +284,5 @@
                  'LineWidth',2);
     end
-elseif strcmpi(nrmplt,'off')
+elseif strncmpi(nrmplt,'off',3) || strncmpi(nrmplt,'n',1)
     hl1=bar (edges(1:end-1),dhistc(1:end-1,1:1*ncol));
 end
@@ -284,5 +292,5 @@
 %  set barseries properties for clarity
 
-if (length(hl1) > 1)
+if (ncol > 1) || strncmpi(nrmplt,'b',1)
     for i=1:length(hl1)
         if strcmpi(get(hl1(i),'Type'),'hggroup')
@@ -340,5 +348,6 @@
 %  add the annotation
 
-if exist('cdfplt','var') && strcmpi(cdfplt,'off')
+if exist('cdfplt','var') && ...
+   (strncmpi(cdfplt,'off',3) || strncmpi(cdfplt,'n',1))
     title('Relative Frequency Histogram')
 else
@@ -357,5 +366,6 @@
 %%  generate the cumulative distribution functions
 
-if ~exist('cdfplt','var') || ~strcmpi(cdfplt,'off')
+if ~exist('cdfplt','var') || ...
+   (~strncmpi(cdfplt,'off',3) && ~strncmpi(cdfplt,'n',1))
 %     cdf=zeros(size(dhistc));
 %     cdf(1,:)=dhistc(1,:);
@@ -437,5 +447,6 @@
     ylabel('Cumulative Percent');
 
-    if ~exist('cdfleg','var') || ~strcmpi(cdfleg,'off')
+    if ~exist('cdfleg','var') || ...
+       (~strncmpi(cdfleg,'off',3) && ~strncmpi(cdfleg,'n',1))
 % legend doesn't combine with bar chart above
         if exist('cdescr','var')
Index: /issm/trunk/src/m/qmu/plot/plot_if_bars.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_if_bars.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_if_bars.m	(revision 7398)
@@ -93,6 +93,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax','ifmin','isort','xtlrot'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_if_spec.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_if_spec.m	(revision 7398)
+++ /issm/trunk/src/m/qmu/plot/plot_if_spec.m	(revision 7398)
@@ -0,0 +1,277 @@
+%
+%  plot a line plot or bar chart of the spectrum of importance factors.
+%
+%  []=plot_if_spec(dresp      ,params)
+%  []=plot_if_spec(dresp,descr,params)
+%
+%  where the required input is:
+%    dresp         (structure array, responses)
+%      or
+%    dresp         (structure array, responses)
+%    descr         (cell array, list of response descriptions desired)
+%
+%  the required fields of dresp are:
+%    descriptor    (char, description)
+%    var           (cell array, variables)
+%    impfac        (double array, importance factors)
+%
+%  the optional input is:
+%    params        (string/numeric, parameter names and values)
+%
+%  where the optional parameters are:
+%    cplot         (char, 'l'/'b'/'g' to plot line/bar)
+%    cline         (char, 'off'/'no'/'-'/'--'/':'/etc. to change lines)
+%    lwidth        (numeric, line width in points, default 0.5)
+%    cmark         (char, 'on'/'yes'/'+'/'o'/'*'/etc. to change markers)
+%    msize         (numeric, marker size in points, default 6)
+%    ymin          (numeric, minimum of y-axis)
+%    ymax          (numeric, maximum of y-axis)
+%    ygrid         (char, 'on' to turn on y-grid lines)
+%    ylog          (char, 'yes' to use log y-axis)
+%    ifmin         (double, minimum importance factor)
+%    isort         (numeric, sort flag:  0, no sorting;
+%                                        1, highest at right;
+%                                       -1, lowest at right)
+%    xtlrot        (numeric, rotation in degrees of x-tick labels)
+%
+%  for each response in the input array, this function plots
+%  a bar plot of the importance factors and annotates it with the
+%  description.  the legend labels are constructed from the
+%  response list.
+%
+%  this data would typically be contained in the dakota output
+%  file from a local reliability analysis and read by
+%  dakota_out_parse.
+%
+%  "Copyright 2010, by the California Institute of Technology.
+%  ALL RIGHTS RESERVED. United States Government Sponsorship
+%  acknowledged. Any commercial use must be negotiated with
+%  the Office of Technology Transfer at the California Institute
+%  of Technology.  (J. Schiermeier, NTR 47078)
+%
+%  This software may be subject to U.S. export control laws.
+%  By accepting this  software, the user agrees to comply with
+%  all applicable U.S. export laws and regulations. User has the
+%  responsibility to obtain export licenses, or other export
+%  authority as may be required before exporting such information
+%  to foreign countries or providing access to foreign persons."
+%
+function []=plot_if_spec(varargin)
+
+if ~nargin
+    help plot_if_spec
+    return
+end
+
+%%  process input data and assemble into matrices
+
+%  responses
+
+iarg=1;
+if isstruct(varargin{iarg})
+    dresp=varargin{iarg};
+    iarg=iarg+1;
+    
+%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
+    if iarg <= nargin && iscell(varargin{iarg})
+        dresp=struc_desc(dresp,varargin{iarg});
+        iarg=iarg+1;
+    end
+    
+    descr=cell (1,length(dresp));
+    lifr =zeros(1,length(dresp));
+    for i=1:length(dresp)
+        lifr(i)=length(dresp(i).impfac);
+    end
+    ifr =zeros(length(dresp),max(lifr));
+    dvar=dresp(find(lifr == max(lifr),1,'first')).var;
+
+    for i=1:length(dresp)
+        descr(i)=cellstr(dresp(i).descriptor);
+        ifr(i,1:lifr(i))=dresp(i).impfac;
+    end
+else
+    error(['''' inputname(iarg) ''' is not a structure.']);
+end
+
+%  parameters
+
+while (iarg <= nargin-1)
+    if ischar(varargin{iarg})
+        if ~isempty(strmatch(varargin{iarg},...
+                {'cplot','cline','lwidth','cmark','msize',...
+                 'ymin','ymax','ygrid','ylog',...
+                 'ifmin','isort','xtlrot'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
+    else
+        error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
+    end
+    iarg=iarg+2;
+end
+
+if ~exist('cplot','var') || isempty(cplot)
+    cplot='line';
+end
+
+if ~exist('ifmin','var') || isempty(ifmin)
+    ifmin=0;
+end
+
+if ~exist('isort','var') || isempty(isort)
+    isort=0;
+end
+
+%%  sort the data, if necessary
+
+if (isort)
+    ifmean=mean(ifr,1);
+    if (isort > 0)
+        [ifmean,index]=sort(ifmean,'ascend' );
+    else
+        [ifmean,index]=sort(ifmean,'descend');
+    end
+    clear ifmean
+    
+    dvar=dvar(index);
+    ifr =ifr (:,index);
+end
+
+%%  filter the data, if necessary
+
+if (ifmin > 0)
+    nif=length(dvar);
+    dvar(nif+1,1)=cellstr(sprintf('others < %f',ifmin));
+    ifr (:,nif+1)=0.;
+    
+    nif2=0;
+    dvar2=cell (size(dvar));
+    ifr2 =zeros(size(ifr ));
+    
+%  sum filtered rows and copy unfiltered rows
+
+    for i=1:nif
+        if (max(ifr(:,i)) < ifmin)
+            ifr(:,nif+1)=ifr(:,nif+1)+ifr(:,i);
+        else
+            nif2=nif2+1;
+            dvar2(nif2)  =dvar(i);
+            ifr2 (:,nif2)=ifr (:,i);
+        end
+    end
+    
+%  copy sums
+
+    dvar2(nif2+1)  =dvar(nif+1);
+    ifr2 (:,nif2+1)=ifr (:,nif+1);
+    
+%  copy back and truncate filtered rows
+
+    clear dvar ifr
+    if (isort >= 0)
+        dvar(1:nif2+1)  =dvar2(1:nif2+1);
+        ifr (:,1:nif2+1)=ifr2 (:,1:nif2+1);
+    else
+        dvar(1       )  =dvar2(  nif2+1);
+        dvar(2:nif2+1)  =dvar2(1:nif2  );
+        ifr (:,1       )=ifr2 (:,  nif2+1);
+        ifr (:,2:nif2+1)=ifr2 (:,1:nif2  );
+    end
+    clear nif nif2 dvar2 ifr2
+end
+
+%%  draw the line or bar plot
+
+%  if there's only one row, Matlab 7.5 interprets it as a column,
+%  so add an extra row, then reduce xlim
+
+if length(dvar) == 1
+    ifr=[ifr; ifr];
+end
+
+%newplot();
+figure
+ax1=axes;
+if strncmpi(cplot,'l',1)
+    if ~exist('cline','var') || strncmpi(cline,'on' ,2) || strncmpi(cline,'y',1)
+        cline='-';
+    elseif strncmpi(cline,'off',3) || strncmpi(cline,'n',1)
+        cline='none';
+    end
+    if ~exist('lwidth','var')
+        lwidth=0.5;
+    end
+    if ~exist('cmark','var') || strncmpi(cmark,'off',3) || strncmpi(cmark,'n',1)
+        cmark='none';
+    elseif strncmpi(cmark,'on' ,2) || strncmpi(cmark,'y',1) || ...
+           (length(cmark) > 1)
+        cmark='+';
+    end
+    if ~exist('msize','var')
+        msize=6;
+    end
+
+    hl1=plot(ax1,ifr','LineStyle',cline,'LineWidth',lwidth,...
+             'Marker',cmark,'MarkerSize',msize);
+else
+    hl1=bar(ax1,ifr');
+end
+
+ax1=gca;
+if length(dvar) == 1
+    set(ax1,'xlim',[0.5 1.5])
+else
+    set(ax1,'xlim',[0.5 length(dvar)+0.5])
+end
+
+if exist('ylog','var') && strncmpi(ylog,'y',1)
+    set(ax1,'yscale','log')
+    ylim('auto')
+    [ylims]=ylim;
+else
+    [ylims]=[0 1.2];
+end
+if exist('ymin','var')
+    ylims(1)=ymin;
+end
+if exist('ymax','var')
+    ylims(2)=ymax;
+end
+ylim(ylims)
+if strncmpi(cplot,'b',1) && exist('ylog','var') && strncmpi(ylog,'y',1)
+    set(hl1,'basevalue',ylims(1))
+end
+
+set(ax1,'xtick',1:length(dvar))
+set(ax1,'xticklabel',dvar)
+if exist('xtlrot','var')
+    htl=rotateticklabel(ax1,xtlrot);
+    tlext=zeros(length(htl),4);
+    for i=1:length(htl)
+        tlext(i,:)=get(htl(i),'Extent');
+    end
+end
+
+%  add the annotation
+
+if length(descr) > 1
+    title('Importance Factors of Responses')
+    hleg1=legend(ax1,descr,'Location','EastOutside',...
+                 'Orientation','vertical','Interpreter','none');
+else
+    title(['Importance Factors of ' descr{1}],'Interpreter','none')
+end
+xlabel('Variable')
+if exist('xtlrot','var')
+    xlext=get(get(ax1,'xlabel'),'Extent');
+    nskip=ceil(max(tlext(:,4))/xlext(4));
+    xlabel(cellstr([repmat('        ',nskip,1);'Variable']));
+    clear nskip xlext tlext
+end
+ylabel('Importance Factor Value')
+
+end
Index: /issm/trunk/src/m/qmu/plot/plot_normdist_bars.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_normdist_bars.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_normdist_bars.m	(revision 7398)
@@ -108,6 +108,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'prob','ymin','ymax','xtlrot','lstr'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_normplot.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_normplot.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_normplot.m	(revision 7398)
@@ -106,6 +106,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'xmin','xmax'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_prob_bars.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_prob_bars.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_prob_bars.m	(revision 7398)
@@ -103,6 +103,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax','xtlrot','cmap','lstr'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_rlev_bars.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_rlev_bars.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_rlev_bars.m	(revision 7398)
@@ -95,6 +95,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax','xtlrot','lstr'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_rlev_bars_ci.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_rlev_bars_ci.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_rlev_bars_ci.m	(revision 7398)
@@ -109,6 +109,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax','xtlrot','lstr'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_rvsv_line.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_rvsv_line.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_rvsv_line.m	(revision 7398)
@@ -163,6 +163,13 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'nplotr','nplotc',...
+                 'ymin','ymax','yscat'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
@@ -210,5 +217,6 @@
         hplot(end+1)=plot   (sampv(indxv ,ivar),sampr(indxv ,iresp),'-x');
         cdesc(end+1)={[descr{iresp} ' wrt ' descv{ivar}]};
-        if ~exist('yscat','var') || ~strcmpi(yscat,'off')
+        if ~exist('yscat','var') || ...
+           (~strncmpi(yscat,'off',3) && ~strncmpi(yscat,'n',1))
             hscat(end+1)=scatter(sampv(indxv2,ivar),sampr(indxv2,iresp),'+k');
 %  see "controlling legends" in Matlab on-line docs
Index: /issm/trunk/src/m/qmu/plot/plot_rvsv_scat3.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_rvsv_scat3.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_rvsv_scat3.m	(revision 7398)
@@ -172,6 +172,14 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'nplotr','nplotc',...
+                 'ymin','ymax','zmin','zmax',...
+                 'cmin','cmax','smark'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_rvsv_surf.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_rvsv_surf.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_rvsv_surf.m	(revision 7398)
@@ -169,6 +169,14 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'nplotr','nplotc',...
+                 'zmin','zmax',...
+                 'cmin','cmax'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
Index: /issm/trunk/src/m/qmu/plot/plot_sampdist_bars.m
===================================================================
--- /issm/trunk/src/m/qmu/plot/plot_sampdist_bars.m	(revision 7397)
+++ /issm/trunk/src/m/qmu/plot/plot_sampdist_bars.m	(revision 7398)
@@ -107,6 +107,12 @@
 while (iarg <= nargin-1)
     if ischar(varargin{iarg})
-        eval([varargin{iarg} '=varargin{iarg+1};']);
-        disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        if ~isempty(strmatch(varargin{iarg},...
+                {'ymin','ymax','xtlrot','lstr'},...
+                'exact'))
+            eval([varargin{iarg} '=varargin{iarg+1};']);
+            disp([varargin{iarg} '=' any2str(varargin{iarg+1}) ';']);
+        else
+            warning([varargin{iarg} '=' any2str(varargin{iarg+1}) ' is not recognized.']);
+        end
     else
         error(['''' any2str(varargin{iarg}) ''' is not a parameter name.']);
