How do I make a graph of a function which takes a date as input, over a full year?
[Edit] To clarify, I have an existing function, say f
, which takes a date as input and returns a value between 0 and 90. I want to plot this function over the year 2016, so plot the value for every day in 2016.
My try
I can reduce this question to making a list like
Table[
{d, f[d]},
{d, DateObject[{2016, 1, 1}], DateObject[{2016, 12, 31}]}
]
and then doing ListPlot
or something, but obviously I need to give Mathematica at least the step size (one day) and find a way to add a day to a date in such an iteration.
Maybe DateRange
is an idea to make a list of dates of a year, but not sure how I would attach my function to that properly.
PS I'm on Mathematica 11.0
[Edit] As per request, my own function is a little big too put here, but for example function
g[d_] := (
DateValue[d, "Month"] + DateValue[d, "Day"]
)
Will do, I guess.