function []=cdraw(type, data, sig_sep, aux);

    plotcolors = ['r' 'b' 'g'];

    if strcmp(type,'gauss')
        try
            ezcontour(@(x,y)pdf(aux,[x y]));
        catch
            disp('GM EM draw error.');
        end;
        xlabel(''); ylabel('');
        hold on;
        title('Gauss mixture EM');
    end;

    for color=1:max(sig_sep);

        plsel=data(sig_sep(1:size(data,1))==color, :);
        plot(plsel(:,1), plsel(:,2), [plotcolors(color) '.']);
        hold on;

    end;
    
    %xlabel('C1');ylabel('C2');

    if strcmp(type,'gauss')
        try
            plot(aux.mu(:,1),aux.mu(:,2), 'kx','MarkerSize',8);
        catch
            disp('GM EM draw error.');
        end;    
        title('Gauss mixture EM');
    end;
    if strcmp(type,'kmeans')
        plot(aux(:,1),aux(:,2),'kx','MarkerSize',8);
        title('K-means');
    end;
    if strcmp(type,'orig')
        title('Original data');
    end;
    if strcmp(type,'hierarch')
        title('Hierarchical');
    end;
    
    hold off;

end