function draw(this, Data,NormalRefresh)
%  DRAW  Draw method for the @pzview class to generate the response curves.

%  Author(s): John Glass, Bora Eryilmaz, Kamesh Subbarao
%  Copyright 1986-2004 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:53:11 $
hsv = Data.HSV;
nsv = length(hsv);

% Get number of infinite HSV
nns = sum(isinf(hsv));

% Get Y limits
Axes = this.AxesGrid;
Ylims = getylim(Axes,1);
dY = Ylims(2)-Ylims(1);

% Stable HSV
if strcmp(Axes.YScale,'linear')
   % Linear scale
   idxf = nns+1:nsv;
   set(this.FiniteSV,'Xdata',idxf,'YData',hsv(idxf))
else
   % Log scale
   nz = sum(hsv==0);
   set(this.FiniteSV,'Xdata',nns+1:nsv,...
      'YData',[hsv(nns+1:nsv-nz) ; repmat(Ylims(1)/2,nz,1)])
end
refresh(this.FiniteSV)

% Unstable HSV
set(this.InfiniteSV,'Xdata',1:nns,'YData',repmat(2*Ylims(2),1,nns))
refresh(this.InfiniteSV)
% hasbehavior(double(this.InfiniteSV),'Legend',(nns>0))
% workaround starts g244975  
h = double(this.InfiniteSV);
if nns>0
   if ~isappdata(h,'LegendLegendInfo')
      setappdata(h,'LegendLegendInfo',[])
   end
else
   if isappdata(h,'LegendLegendInfo')
      rmappdata(h,'LegendLegendInfo')
   end
end
% workaround ends

% barseries.refresh messes up with the tick mode
set(getaxes(Axes),'XTickMode','auto')