function showDecisionBoundary(lda,X,c,classNames)

[xx,yy] = meshgrid(linspace(-2,5,301));
pred_grid = predict(lda,[xx(:),yy(:)]);
pred_grid = reshape(pred_grid,size(xx));

image(xx(1,:),yy(:,1),pred_grid)

cmap = [1,.25,.25;.25,.25,1;.25,1,.25;1,1,.25;,.25,.25,1];
colormap(cmap(1:max(c),:));
if exist('X','var')
    hold on
    for i=1:max(c)
        h(i) = plot(X(c==i,1),X(c==i,2),'ko','MarkerFaceColor',round(cmap(i,:)));
    end
    if exist('classNames','var')
        legend(classNames);   
    end
end
axis equal
axis tight
set(gca,'YDir','normal');
xlabel('Eye shape');
ylabel('Nose length');

