The following example of the curve function in R,
curve(dgamma(x, 3, .1), add=T, lwd=2, col="orange")
,
plots the curve for the probability density function of the dgamma
continuous distribution. The equivalent to dgamma
in Python is scipy.stats.dgamma
.
How can I plot the same curve for the same distribution in Python? I would like this more than fitting a kernel density estimator (KDE), which tend to be inaccurate.