code: def create_snapshot_chart(self, filename=''):
          
          try:
              from pylab import figure, title, xlabel, ylabel, plot, fill, legend, savefig
              import matplotlib.mlab as mlab
          except ImportError:
              return self.nopylab_msg % ("memory allocation")
  
          classlist = self.tracked_classes
  
          times = [snapshot.timestamp for snapshot in self.snapshots]
          base = [0] * len(self.snapshots)
          poly_labels = []
          polys = []
          for cn in classlist:
              pct = [snapshot.classes[cn]['pct'] for snapshot in self.snapshots]
              if max(pct) > 3.0:
                  sz = [float(fp.classes[cn]['sum'])/(1024*1024) for fp in self.snapshots]
                  sz = [sx+sy for sx, sy in zip(base, sz)]
                  xp, yp = mlab.poly_between(times, base, sz)
                  polys.append( ((xp, yp), {'label': cn}) )
                  poly_labels.append(cn)
                  base = sz
  
          figure()
          title("Snapshot Memory")
          xlabel("Execution Time [s]")
          ylabel("Virtual Memory [MiB]")
  
          sizes = [float(fp.asizeof_total)/(1024*1024) for fp in self.snapshots]
          plot(times, sizes, 'r--', label='Total')
          sizes = [float(fp.tracked_total)/(1024*1024) for fp in self.snapshots]
          plot(times, sizes, 'b--', label='Tracked total')
  
          for (args, kwds) in polys:
              fill(*args, **kwds)
          legend(loc=2)
          savefig(filename)
  
          return self.chart_tag % (self.relative_path(filename))
docs: Create chart that depicts the memory allocation over time apportioned to
          the tracked classes.