pythonplotdistributionnormal-distribution

How to get the figure produced by the fitter package?


I am using the fitter package to fit many distributions simultaneously and visualize the outcome (documentation). However, I want access to the figure it produces.

from fitter import Fitter
f = Fitter(data=df, distributions=['gamma', "norm", 'invgauss'], timeout=100)
f.fit()
f.summary()

f.summary() returns two objects, a dataframe of the numerical outcomes and a plot visualizing the outcome. I need to be able to store the figure into a variable, such that I can use it in my data visualization dashboard.


Solution

  • OK, so I found the answer:

    f.plot_pdf()
    f.hist()