Plotting a cumulative graph of python datetimes
- by ventolin
Say I have a list of datetimes, and we know each datetime to be the recorded time of an event happening.
Is it possible in matplotlib to graph the frequency of this event occuring over time, showing this data in a cumulative graph (so that each point is greater or equal to all of the points that went before it), without preprocessing this list? (e.g. passing datetime objects directly to some wonderful matplotlib function)
Or do I need to turn this list of datetimes into a list of dictionary items, such as:
{"year": 1998, "month": 12, "date": 15, "events": 92}
and then generate a graph from this list?
Sorry if this seems like a silly question - I'm not all too familiar with matplotlib, and would like to save myself the effort of doing this the latter way if matplotlib can already deal with datetime objects itself.