function afterProcessGamutPlot

%afterProcessGamutPlot allows you to display gamut mapped source gamut and 
%destination gamut in one plot, a Yy vs. Cx plot and a Cx vs. Cz plot.
    close all

    load('data/IndigoGamut.mat')%Indigo/Destination Gamut
    load('data/imgYyCxCzUniqueUpdate.mat')%Image/Source gamut
    load('data/np8_ycxcz_measured.mat')% 8 vertices from Indigo gamut, use for plotting
    vertices=np8_ycxcz(:,4:6)';

    figure(1)
    plot3(imgYyCxCzUniqueUpdate(:,2),imgYyCxCzUniqueUpdate(:,3),imgYyCxCzUniqueUpdate(:,1),'.','MarkerSize',5)
    hold on
    plot3(IndigoGamut(:,2),IndigoGamut(:,3),IndigoGamut(:,1),'.','MarkerSize',5)
    hold on
    plot3(vertices(2,:),vertices(3,:),vertices(1,:),'.','MarkerSize',20)
    grid on
    xlabel('Cx')
    ylabel('Cz')
    zlabel('Yy')
    text(vertices(2,1),vertices(3,1),vertices(1,1)+.1,'W');
    text(vertices(2,2),vertices(3,2),vertices(1,2)+.1,'Y');
    text(vertices(2,3),vertices(3,3),vertices(1,3)+.1,'C');
    text(vertices(2,4),vertices(3,4),vertices(1,4)-.1,'CY');
    text(vertices(2,5),vertices(3,5),vertices(1,5)+.1,'M');
    text(vertices(2,6),vertices(3,6),vertices(1,6)+.1,'MY');
    text(vertices(2,7),vertices(3,7),vertices(1,7)+.1,'CM');
    text(vertices(2,8),vertices(3,8),vertices(1,8)-.1,'CMY');
    title('Source and destination gamut after gamut mapping')
    name = sprintf('gamut_src_dest_afterGamutMapping.png');
    saveas(gca,[pwd '/output/',name]);
    
    figure(2)
    plot(imgYyCxCzUniqueUpdate(:,2),imgYyCxCzUniqueUpdate(:,1),'.','MarkerSize',5)
    hold on
    plot(IndigoGamut(:,2),IndigoGamut(:,1),'.','MarkerSize',5)
    hold on
    plot(vertices(2,:),vertices(1,:),'.','MarkerSize',20)
    grid on
    legend('Source gamut','Destination gamut')
    xlabel('Cx')
    ylabel('Yy')
    text(vertices(2,1),vertices(1,1)+.1,'W');
    text(vertices(2,2),vertices(1,2)+.1,'Y');
    text(vertices(2,3),vertices(1,3)+.1,'C');
    text(vertices(2,4),vertices(1,4)-.1,'CY');
    text(vertices(2,5),vertices(1,5)+.1,'M');
    text(vertices(2,6),vertices(1,6)+.1,'MY');
    text(vertices(2,7),vertices(1,7)+.1,'CM');
    text(vertices(2,8),vertices(1,8)-.1,'CMY');
    title('Source and destination gamut after gamut mapping Yy vs. Cx view')
    name = sprintf('gamut_src_dest_afterGamutMapping Yy vs. Cx view.png');
    saveas(gca,[pwd '/output/',name]);
    
    figure(3)
    plot(imgYyCxCzUniqueUpdate(:,2),imgYyCxCzUniqueUpdate(:,3),'.','MarkerSize',5)
    hold on
    plot(IndigoGamut(:,2),IndigoGamut(:,3),'.','MarkerSize',5)
    hold on
    plot(vertices(2,:),vertices(3,:),'.','MarkerSize',20)
    grid on
    legend('Source gamut','Destination gamut')
    xlabel('Cx')
    ylabel('Cz')
    text(vertices(2,1),vertices(3,1)+.1,'W');
    text(vertices(2,2),vertices(3,2)+.1,'Y');
    text(vertices(2,3),vertices(3,3)+.1,'C');
    text(vertices(2,4),vertices(3,4)-.1,'CY');
    text(vertices(2,5),vertices(3,5)+.1,'M');
    text(vertices(2,6),vertices(3,6)+.1,'MY');
    text(vertices(2,7),vertices(3,7)+.1,'CM');
    text(vertices(2,8),vertices(3,8)-.1,'CMY');
    title('Source and destination gamut after gamut mapping Cx vs. Cz view')
    name = sprintf('gamut_src_dest_afterGamutMapping Cx vs. Cz view.png');
    saveas(gca,[pwd '/output/',name]);
    close all
end
