1 year ago

#369557

test-img

wu-lee

How to plot a best fit curve in Julia when the data is a time series?

I'm trying to plot some measurements over time with a best-fit curve, using Julia's plotting tools. There's already a fairly good answer how to do this with a simple numeric data series:

Julia: How to find best fit curve / equation when I have a plot?

However, these tools (well - at least the Polynomials package) do not like being given Date values. I imagine some sort of conversion from Dates into a numeric value needs to be done, but I want the resulting plots to retain their scales in date units, which would need a conversion back again.

I suspect this is a fairly common problem and there must be an elegant way to solve it, but being new to Julia I would like to ask for some pointers to what a good solution looks like?

Thanks!

plot

julia

curve-fitting

polynomials

0 Answers

Your Answer

Accepted video resources