max_height_good = 500 average_good = 1200 std_dev_good = 300 max_height_bad = 7000 average_bad = 1000 std_dev_bad = 300 histgood(x)=max_height_good*exp(-(x-average_good)**2/std_dev_good**2) histbad(x)=max_height_bad*exp(-(x-average_bad)**2/std_dev_bad**2) plot [0:3000][] \ 'histcccgood.dat' using 3:4 title 'good' with boxes, \ 'histcccbad.dat' using 3:4 title 'bad' with boxes, \ histgood(x) title 'fitted good', \ histbad(x) title 'fitted bad'