function plot1(D,nt2,ntime,T,ricker,dt,io,dx,fr,v,Ax,Ay,Az,Bx,By,Bz,Sx,Sy,Sz)
par=2.4;alpha=120;
D=D/max(abs(D));mn=min(D(nt2:ntime+nt2));

subplot(121);plot([0:ntime-1]*dt,D(nt2+1:ntime+nt2));axis([0 dt*ntime/par mn 1]);hold on;plot([T T],[0 1],'--');hold off
D00=conv(D(nt2+1:ntime),ricker');xlabel('Time (s)');D00=D00/max(abs(D00));
ylabel('Normalized Amplitude');title('Direct Wave Impulse Response')
if io==0;text(dt*ntime/par-alpha*dt,.5,'dashed line = exact');text(dt*ntime/par-alpha*dt,.4,'solid line = numerical')
text(dt*ntime/par-alpha*dt,.6,['(dx, dt) = (',num2str(dx),' m, 0.83 ms)'])
text(dt*ntime/par-alpha*dt,.7,['(fre, \lambda) = (',num2str(fr),' Hz, ',num2str(v/fr/2),' m)']);
text(dt*ntime/par-alpha*dt,.3,['(A_x,A_y,A_z) = (',num2str(Ax),',',num2str(Ay),',',num2str(Az),')']);
text(dt*ntime/par-alpha*dt,.2,['(B_x,B_y,B_z) = (',num2str(Bx),',',num2str(By),',',num2str(Bz),')']);
text(dt*ntime/par-alpha*dt,.1,['(S_x,S_y,S_z) = (',num2str(Sx),',',num2str(Sy),',',num2str(Sz),')']);
end
if io==1;title('Scattered Wave Impulse Response');end;
if ntime>length(D00);ll=length(D00);D00=[D00 ; zeros(ntime,1)];end


subplot(122);plot([0:ntime-1]*dt,D00(1:ntime),'-');hold on;
xlabel('Time (s)')
hold on;
alpha=150;
nt=round(T/dt)+1;i=zeros(nt,1);i(nt)=1;i=conv(ricker,i);i=i/max(abs(i));l=length(i);
plot([0:l-1]*dt,i(1:l),'--');axis([0 dt*ntime/par min(i) max(i)]);hold off
ylabel('Normalized Amplitude');title('Direct Wave Bandlimited  Response');
if io==1;title('Scattered Wave Bandlimited  Response');end
%text(dt*ntime/par-alpha*dt,-.5,'dashed line = exact');text(dt*ntime/par-alpha*dt,-.6,'solid line = numerical')
%text(dt*ntime/par-alpha*dt,-.7,['(dx, dt) = (',num2str(dx),' m, ',num2str(dt*1000),' ms)'])
%text(dt*ntime/par-alpha*dt,-.8,['(fre, lamda) = (',num2str(fr),' Hz, ',num2str(v/fr/2),' m)'])
