function o = plot_em(pts, weights1, mean1, mean2, sigma)

figure
hold on
axis([0,255,-.2, 1.2]);

colors = 'kbgyr';
for i = 1:5
    lev2 = 1 - .2*i;
    lev1 = lev2 + .2;
    inds = lev1 >= weights1 & weights1 > lev2;
    color = colors(i);
    if sum(inds) > 0
        plot(pts(inds), 0, [color, 'o']);
    end
end
    
a = (mean1 - 3*sigma):(mean1 + 3*sigma);
plot(a, exp(- (a-mean1).^2 / (sigma*sigma)), 'm');
   
a = (mean2 - 3*sigma):(mean2 + 3*sigma);
plot(a, exp(- (a-mean2).^2 / (sigma*sigma)), 'c');

hold off

o = 1;
    