min: 0,
          max: nflot
        },
        yaxis: {
          min: -0.1,
          max: 0.1
        }
      });
      setInterval(function(){
        for(var i=0; i<w.agents.length; i++) {
          series[i].data = getFlotRewards(i);
        }
        plot.setData(series);
        plot.draw();
      }, 100);
    }
    function getFlotRewards(agentId) {
      // zip rewards into flot data
      var res = [];
      if(agentId >= w.agents.length || !smooth_reward_history[agentId]) {
        return res;
 