%выводит на один рисунок график исходного ряда, 4-го момента и 5-го момента
%g_data - результат выполнения функции dwwar

function [ output_args ] = plots_norm(g_data,textdata)
%g_data=ans;
wdata=g_data.ss6(g_data.ss7+1:length(g_data.ss6)-1,:);
xxt=num2str(wdata);
[rw,cw]=size(wdata);
jj=1;
for ii=1:rw-1
 if strncmpi(xxt(ii,:),xxt(ii+1,:),4)==0 
  xxt1(jj,:)=xxt(ii+1,:);%1:4);
  xxt2(jj)=ii+1;
  jj=jj+1;
end
end

%figure(7)
%colormap(gray);
figure(1)
%subplot(3,1,1); 
plot(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:),'LineWidth',2); grid on
[wr,wc]=size(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:));
XMIN=0; YMIN=min(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:))-1; 
XMAX=wr; YMAX=max(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:))+1;
axis([XMIN XMAX YMIN YMAX])
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Price','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');

figure(2) 
h=mesh(g_data.ss3(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss3(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss3(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss3(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('coefs','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');


figure(3) 
h=mesh(g_data.ss(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^2','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');

figure(4) 
h=mesh(g_data.ss1(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss1(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss1(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss1(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^3','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');


figure(5) 
h=mesh(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^4','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');

figure(6) 
h=mesh(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^5','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');

figure(7)
subplot(3,1,1); 
plot(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:),'LineWidth',2); grid on
[wr,wc]=size(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:));
XMIN=0; YMIN=min(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:))-1; 
XMAX=wr; YMAX=max(g_data.ss2(g_data.ss7+1:length(g_data.ss6),:))+1;
axis([XMIN XMAX YMIN YMAX])
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Price','FontSize',16,'FontName','Times New Roman');
title(textdata,'FontSize',28,'FontName','Times New Roman');



subplot(3,1,2); 
h=mesh(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss4(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^4','FontSize',16,'FontName','Times New Roman');
%title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');


subplot(3,1,3); 
h=mesh(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6)))
[wr,wc]=size(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6)));
XMIN=0; YMIN=0; ZMIN=min(min(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6))));
XMAX=wc; YMAX=wr;ZMAX=max(max(g_data.ss5(:,g_data.ss7+1:length(g_data.ss6))));
axis([XMIN XMAX YMIN YMAX ZMIN ZMAX]);
set(gca,'XTick',xxt2,'FontSize',14)
set(gca,'XTickLabel',xxt1,'FontSize',14)
xlabel('Time, years','FontSize',16,'FontName','Times New Roman');
ylabel('Scale','FontSize',16,'FontName','Times New Roman');
zlabel('\sigma^5','FontSize',16,'FontName','Times New Roman');
%title(textdata,'FontSize',28,'FontName','Times New Roman');
set(h,'FaceLighting','phong','FaceColor','interp',...
      'AmbientStrength',0.5)
light('Position',[1 0 0],'Style','infinite');

