I have a databin of heart rates that I can use with DateListPlot. Now, say I want to highlight a specific time range in the plot (12 noon to 1 PM) by shading the area of the plot from 12 noon to 1 PM.
Question is, how do I do that shading?
DateListPlot[Databin["xxxxxxxxx", {Yesterday, Today}],
"PlotTheme" -> "Detailed", "ImageSize" -> "Large"]
Hi Steven,
Here is one way
data = {
{DateObject[{2016, 10, 1}, "Day", "Gregorian", -5.`], 10},
{DateObject[{2016, 10, 15}, "Day", "Gregorian", -5.`], 17},
{DateObject[{2016, 10, 30}, "Day", "Gregorian", -5.`], 15},
{DateObject[{2016, 11, 20}, "Day", "Gregorian", -5.`], 20}}
(* Change the bounds of the rectangle to span the area of interest to you *)
epilog = {Opacity@.2, Green,
Rectangle[{DateObject[{2016, 10, 17}], 0}, {DateObject[{2016, 10, 31}], 25}]};
DateListPlot[data, Epilog -> epilog]