docs: def plotDensity(dataTask, filename):
      """Plot the worker density graph"""
  
      #def format_worker(x, pos=None):
      #    """Formats the worker name"""
      #    #workers = filter (lambda a: a[:6] != "broker", dataTask.keys())
      #    workers = [a for a in dataTask.keys() if a[:6] != "broker"]
      #    return workers[x]
  
      def format_time(x, pos=None):
          """Formats the time"""
          start_time, end_time = [(a - begin_time) / 1000 for a in getTimes(dataTask)]
          return int(end_time * x / DENSITY_MAP_TIME_AXIS_LENGTH)
  
      graphdata = WorkersDensity(dataTask)
      if len(graphdata):
          fig = plt.figure()
          ax = fig.add_subplot(111)
          box = ax.get_position()
          ax.set_position([box.x0 + 0.15 * box.width, box.y0, box.width, box.height])
          #cax = ax.imshow(graphdata, interpolation='nearest', aspect='auto')
          if args.binarydensity:
              cmap = ListedColormap(['r', 'g'])
              norm = BoundaryNorm([0, 0.5, 1], cmap.N)
              cax = ax.imshow(graphdata, interpolation='nearest', aspect='auto', cmap=cmap, norm=norm)
          else:
              cax = ax.imshow(graphdata, interpolation='nearest', aspect='auto')
          plt.xlabel('time (s)'); plt.ylabel('Worker'); ax.set_title('Work density')
          ax.yaxis.set_ticks(range(len(graphdata)))
          ax.tick_params(axis='both', which='major', labelsize=6)
          #ax.yaxis.set_major_formatter(ticker.FuncFormatter(format_worker))
          interval_size = DENSITY_MAP_TIME_AXIS_LENGTH // 4
          ax.xaxis.set_ticks(range(0,
                                   DENSITY_MAP_TIME_AXIS_LENGTH + interval_size,
                                   interval_size))
          ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_time))
          if args.binarydensity:
              cax.set_clim(0, 1)
              cbar = fig.colorbar(cax, ticks=[0, 1])
          else:
              cbar = fig.colorbar(cax)
          fig.savefig(filename)