hn1 = h1/sum(h1)/db1; hn2 = h2/sum(h2)/db2; bar(b1, hn1) hold on bar(b2, hn2, 'facecolor', 'r' ) xlabel('x') ylabel('Probability density') hold off