function p = getRespPlotOpts(p,h,varargin)
%GETRESPPLOTOPTS Gets plot options of @respplot h and assigns them to p 

%  Author(s): C. Buhr
%  Copyright 1986-2004 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:52:23 $

if isempty(varargin)
    allflag = false;
else
    allflag = varargin{1};
end

% IO Grouping
p.IOGrouping = h.IOGrouping;
      
% Input Labels
InputLabelStyle = h.AxesGrid.ColumnLabelStyle;
p.InputLabels = struct('FontSize',   InputLabelStyle.FontSize, ...
                       'FontWeight', InputLabelStyle.FontWeight, ...
                       'FontAngle',  InputLabelStyle.FontAngle, ...
                       'Color',      InputLabelStyle.Color);

% Output Labels
OutputLabelStyle = h.AxesGrid.RowLabelStyle;
p.OutputLabels = struct('FontSize',   OutputLabelStyle.FontSize, ...
                        'FontWeight', OutputLabelStyle.FontWeight, ...
                        'FontAngle',  OutputLabelStyle.FontAngle, ...
                        'Color',      OutputLabelStyle.Color);                    

% IO visibility
p.InputVisible = h.InputVisible;
p.OutputVisible = h.OutputVisible;
         
                 
if allflag
    p = getPlotOpts(p,h);
end
    
  
