What does calling plot function with an array for both x and y do? Look at line number 15.
x1 = stats.norm.ppf(0.001)
x2 = stats.norm.ppf(0.999)
x = np.linspace(x1, x2, 100)
y = stats.norm.pdf(x)
yhalf = []
for i in range(len(x)):
if i > len(x)/2:
yhalf.append(y[i])
else:
yhalf.append(0)
plt.plot([x, x], [y, yhalf], 'y-')
plt.axes().set_xlim(x1, x2)
Does it fill the area between two curves? Can we control or style this filling? I would like to fill with a smooth color with transparency.
Thanks!
