I am using matplotlib in my Python code. I got following warning:
xxx.py:88: MatplotlibDeprecationWarning: scipy.stats.norm.pdfy = 100 * mlab.normpdf(bin_middles, mu, sigma)*bin_width
I was wondering what the issue is, so I can solve it and avoid warnings.
The documentation tells us about matplotlib.mlab.normpdf
Deprecated since version 2.2: scipy.stats.norm.pdf
This translates into: Do not use this function any more, use scipy.stats.norm.pdf
instead.
Hence a previous code like
import matplotlib.mlab as mlab
import numpy as npx = np.linspace(-3,3)
mu = 0
sigma = 1
y = mlab.normpdf(x, mu, sigma)
should now read
import numpy as np
import scipy.statsx = np.linspace(-3,3)
mu = 0
sigma = 1
y = scipy.stats.norm.pdf(x, mu, sigma)