title: Python memory profiler plotting
body: <p>I am trying to log my memory consumption per function. I am using the <a href="https://pypi.python.org/pypi/memory_profiler" rel="nofollow noreferrer">memory_profiler</a> package, and I also get a final graph with my total memory consumption, but not per function as described in <a href="http://fa.bianp.net/blog/2014/plot-memory-usage-as-a-function-of-time/" rel="nofollow noreferrer">this nice tutorial</a></p>
  
  <p>I am using the following script test.py</p>
  
  <pre><code>import time
  from memory_profiler import profile
  
  #-------------------------------
  @profile
  def test1():
      a = [1] * (10 ** 6)
      b = [2] * (2 * 10 ** 7)
      del b
      return a
  
  #-------------------------------
  @profile
  def test2():
      a = [1] * (10 ** 6)
      b = [2] * (2 * 10 ** 7)
      del b
      return a
  
  #-------------------------------
  def main():
  
      l1 = []
      l2 = []
  
      for i in range (5) :
          print "Iteration", i
          l1.append(test1())
          l2.append(test2())
          time.sleep(1)
          if i == 2 :
              del l1
              l1 = []
  
  #-------------------------------
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Running it via</p>
  
  <pre><code>mprof run test.py
  </code></pre>
  
  <p>I get some nice output like</p>
  
  <pre><code>Line #    Mem usage    Increment   Line Contents
  ================================================
  11     46.2 MiB      0.0 MiB   @profile
  12                             def test2():
  13     53.8 MiB      7.6 MiB       a = [1] * (10 ** 6)
  14    206.7 MiB    152.9 MiB       b = [2] * (2 * 10 ** 7)
  15     53.8 MiB   -152.9 MiB       del b
  16     53.8 MiB      0.0 MiB       return a
  </code></pre>
  
  <p>But the plotting it via</p>
  
  <pre><code>mprof plot
  </code></pre>
  
  <p>only shows the total memory consumption, and not these nice brakets, showing the execution of the different functions as described in the link. Does anyone know how to enable this?</p>
  
  <p><a href="https://i.stack.imgur.com/CSSRa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CSSRa.png" alt="enter image description here"></a></p>