<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Matplotlib tutorial 05
 Histogram Plots    
It's a graphical representation of a frequency distribution of some numerical data. Rectangles with equal sizes in the horizontal directions have heights with the corresponding frequencies.
If we construct a histogram, we start with distribute the range of possible x values into usually equal sized and adjacent intervals or bins
Step1:  Plotting Histogram
Step2:  By default, hist is using 10 equal bins to plot the data, we can increase this no by using bins=n
Step3:  Another important keyword parameter of hist is "normed". "normed" is optional and the default value is 'False'. If it is set to 'True', the first element of the return tuple will be the counts normalized to form a probability density, 
i.e., "n/(len(x)`dbin)", ie the integral of the histogram will sum to 1.
Step4:  If both the parameters 'normed' and 'stacked' are set to 'True', the sum of the histograms is normalized to 1.
Step5:  can plot it as a cumulative distribution function as well by setting the parameter 'cumulative'
Step6:  Bar Plots
<ASSISTANT_TASK:>
Python Code:
# import
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# generating some data points
X = np.random.random_integers(20, 50, 1000)
Y = np.random.random_integers(20, 50, 1000)
Explanation: Matplotlib tutorial 05
 Histogram Plots    
It's a graphical representation of a frequency distribution of some numerical data. Rectangles with equal sizes in the horizontal directions have heights with the corresponding frequencies.
If we construct a histogram, we start with distribute the range of possible x values into usually equal sized and adjacent intervals or bins
End of explanation
plt.hist(X)
plt.xlabel("Value of X")
plt.ylabel("Freq")
gaussian_numbers = np.random.normal(size=10000)
plt.hist(gaussian_numbers)
plt.title("Gaussian Histogram")
plt.xlabel("Value")
plt.ylabel("Frequency")
plt.show()
n, bins, patches = plt.hist(gaussian_numbers)
print("n: ",n, np.sum(n))  # freq
print("bins: ", bins)
print("patches: ", patches)
for p in patches:
    print(p,)
Explanation: Plotting Histogram
End of explanation
n, bins, patches = plt.hist(gaussian_numbers, bins=100)
Explanation: By default, hist is using 10 equal bins to plot the data, we can increase this no by using bins=n
End of explanation
n, bins, patches = plt.hist(gaussian_numbers, bins=100, normed=True)
Explanation: Another important keyword parameter of hist is "normed". "normed" is optional and the default value is 'False'. If it is set to 'True', the first element of the return tuple will be the counts normalized to form a probability density, 
i.e., "n/(len(x)`dbin)", ie the integral of the histogram will sum to 1.
End of explanation
plt.hist(gaussian_numbers, 
         bins=100, 
         normed=True, 
         stacked=True, 
         edgecolor="#6A9662",
         color="#DDFFDD")
plt.show()
Explanation: If both the parameters 'normed' and 'stacked' are set to 'True', the sum of the histograms is normalized to 1.
End of explanation
plt.hist(gaussian_numbers, 
         bins=100, 
         normed=True,
         stacked=True,
         cumulative=True)
plt.show()
Explanation: can plot it as a cumulative distribution function as well by setting the parameter 'cumulative'
End of explanation
bars = plt.bar([1,2,3,4], [1,4,9,16])
bars[0].set_color('green')
plt.show()
f=plt.figure()
ax=f.add_subplot(1,1,1)
ax.bar([1,2,3,4], [1,4,9,16])
children = ax.get_children()
children[3].set_color('g')
years = ('2010', '2011', '2012', '2013', '2014')
visitors = (1241, 50927, 162242, 222093, 296665 / 8 * 12)
index = np.arange(len(visitors))
bar_width = 1.0
plt.bar(index, visitors, bar_width,  color="green")
plt.xticks(index + bar_width / 2, years) # labels get centered
plt.show()
Explanation: Bar Plots
End of explanation
<END_TASK>