Here is a short code :
import numpy as np
from scipy.stats import expon
import matplotlib.pyplot as plt
x = np.arange(0, 10, 0.001)
plt.plot(x, expon.pdf(x))
When I type that in the shell in using ipython
, that didn't show up anything while it is supposed to plot the exponential distribution for x between 0 and 10. Could anyone be able to tell me what is the problem here?
I got that, but the plot did show up
In [16]: plt.plot(x, norm.pdf(x))
Out[16]: [<matplotlib.lines.Line2D at 0x7fbfe6bc2890>]
Thanks in advance!
P.S. Be aware that I am using Ubuntu 16.10 (Linux distribution).