Combining a histogram with a normal distribution plot

We now have a histogram and a normal distribution plot individually, but it would be nice if we could visualize both them on one graph with the same scales. This can easily be done by referencing both plots in a single cell and then using the function just once after both plots have been called:

plt.hist(VacationHours, normed = True) # plotting histogram 
plt.plot(VacationHours, normal_distribution_curve, color = "orange") #plotting normal curve 
plt.title("Vacation Hours") #Assign title 
plt.xlabel("Hours") #Assign x label 
plt.ylabel("Count") #Assign y label 

The output of the combined plots can be seen in the following screenshot:

We now have a combined normal distribution ...

Get Practical Business Intelligence now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.