# Plotting sunset in Alabama

auburnSS=Sunset[Entity["City", {"Auburn", "Alabama", "UnitedStates"}],
DateRange[DateObject[{2019, 1, 1}], DateObject[{2019, 12, 31}]]]


I'm trying to make a plot of this, to no avail (tried ListPlot and DateListPlot). I'm guessing maybe I shouldn't be using EventSeries?

I'm trying to get a plot like this:

Also please feel free critique my post formatting (I'm new at this).

• The event series is fine; the issue is that the values are dates which don't map well to the vertical scale. Apr 25, 2019 at 1:47
• wolfram.com/language/12/core-visualization/… might be of interest to you. Apr 25, 2019 at 1:51
• Your post formatting is good. To get better answers you might want to edit your question and add information about the data points you want to plot. What do the x-y scales mean on the plot you want to get? What (x,y) coordinates do you want for, say, the first sunset on Tue 1 Jan 2019 16:47 CDT? Apr 25, 2019 at 3:00

Here is how it works: You collect the sunset times for every day of the year (mySunsetList). Then you get a list of the start times of each day (beginningDays) by setting the hour and minute to zero in each element of the mySunsetList. (You could also do this by merely getting the days of the year... no hour, no minute.)

Then form a list of pairs {beginningDays, mySunsetList-beginningDays}. Then DateListPlot this combined list.

The result is minutes into the day, but if necessary you could convert this to time of day (hours and minutes).

mySunsetList =
Sunset@({Entity[
"City",
{"Auburn", "Alabama", "UnitedStates"}], #} & /@
DateRange[DateObject[{2019, 1, 1}],
DateObject[{2019, 12, 30}]]);
beginningDays = (ReplacePart[DateObject[#],
{{1, 4} -> 0, {1, 5} -> 0}] & /@ mySunsetList);
DateListPlot[
Transpose[
{beginningDays, mySunsetList - beginningDays}],
Filling->Axis,
PlotLabel ->
Text[Style["Sunset time in Auburn (minutes into day)", 18]]]


Try: TargetUnits -> "Hours",