% Test EPS and PNG output drivers
title('Normal distribution');
x = -4:0.1:4;
f = exp(-x.^2/2);
hold on
plot(x,f,'k');
patch([x(21) x(21:61) x(61) x(61)],[0 f(21:61) 0 0],[0.8 1 .8])
patch([x(1) x(1:21) x(21) x(1)],[0 f(1:21) 0 0],'r')
patch([x(61) x(61:end) x(end) x(1)],[0 f(61:end) 0 0],'r')
hold off

print -depsc test_print.eps
print -dpng test_print.png

