title: Plot sum over time
body: <p><a href="https://stackoverflow.com/questions/3034162/plotting-a-cumulative-graph-of-python-datetimes">"Plotting a cumulative graph of python datetimes"</a> provides great methods to use matplotlib to plot a list of datetimes (see below) as a cumulative count over time:</p>
  
  <pre><code>[
      datetime.datetime(2015, 12, 22),
      datetime.datetime(2015, 12, 23),
      datetime.datetime(2015, 12, 23), # note duplicate entry (graph increases by 2)
      datetime.datetime(2015, 12, 24),
      datetime.datetime(2015, 12, 25),
      ...
  ]
  </code></pre>
  
  <p>However, I have a new dataset where each entry has an associated value (see below). How can I plot this as an accumulation? Or do I just need to iterate over the data and accumulate it into x,y plotting pairs myself?</p>
  
  <pre><code>[
      (datetime.datetime(2015, 12, 22), 6), # graph increases by 6
      (datetime.datetime(2015, 12, 23), 5),
      (datetime.datetime(2015, 12, 23), 4), # graph increases by 9
      (datetime.datetime(2015, 12, 24), 12),
      (datetime.datetime(2015, 12, 25), 14),
  ]
  </code></pre>