import matplotlib.pyplot as plt
months= [x for x in range(1,13)]
mortgage= [700, 700, 700,
800, 800, 800,
850, 850, 850,
850, 850, 850]
utilities= [500, 300, 380,
200, 600, 550,
310, 620, 290,
320, 440, 400]
repairs= [100, 120, 100,
150, 850, 80,
120, 220, 240,
50, 60, 150]
plt.plot([],[], color='blue', label='mortgage')
plt.plot([],[], color='orange', label='utilities')
plt.plot([],[], color='brown', label='repairs')
plt.stackplot(months, mortgage, utilities, repairs, colors=['blue', 'orange', 'brown'])
plt.legend()
plt.title('Household Expenses')
plt.xlabel('Months of the year')
plt.ylabel('Cost')
plt.show()
@BIMining
