joshday / OnlineStats.jl

⚡ Single-pass algorithms for statistics
https://joshday.github.io/OnlineStats.jl/latest/
MIT License
836 stars 64 forks source link

Can I plot "fit" result using Gadfly plot?? #144

Closed evveric closed 5 years ago

evveric commented 5 years ago

I use Gadfly to plot since it works better with DataFrames and i like its default format better than "Plots", but i find it impossible to Gadfly.plot using the result of "fit"

Do you think it is possible?

    y = rand(1000)
    s = FTSeries(Partition(Mean()), Partition(Extrema()))
    fit!(s, y)
    # this works fine
    Plots.plot(s, layout = 1)
    # i donno how to do this:
    Gadfly.plot( ???)   

Above, Gadfly does not know what is "s", or FTSeries. Above, should i first convert the "s" into a DataFrame, then plot in Gadfly?

Thank you

joshday commented 5 years ago

All the plotting machinery in OnlineStats is built on Plots. Plotting with Gadfly would require digging into OnlineStats internals a bit. You can take a look at the plot recipes for ideas.