private DensityMap createDensityMap(int numRateBoxes, int numTimeBoxes) {
		double maxTreeHeight = 0;
		double minRate = 1;
		double maxRate = 1;
		for (RootedTree tree : treeList) {
			double thisHeight = tree.getHeight(tree.getRootNode());
			if (thisHeight > maxTreeHeight)
				maxTreeHeight = thisHeight;
			Set<Node> nodeList = tree.getNodes();
			for (Node node : nodeList) {
				if (node != tree.getRootNode()) {
					double rate = getRate(node);
					if (rate < minRate)
						minRate = rate;
					if (rate > maxRate)
						maxRate = rate;
				}
			}
		}
		maxTreeHeight *= 1.0 + edgeFraction;
		double rateSpread = maxRate - minRate;
		minRate -= rateSpread * edgeFraction;
		if (minRate < 0)
			minRate = 0;
		System.out.println("real max = " + maxRate);
		maxRate += rateSpread * edgeFraction;
		System.out.println("new  max = " + maxRate);
//		System.out.println("max treeheight = "+maxTreeHeight);
//		System.out.println("min rate = "+minRate);
//		System.out.println("max rate = "+maxRate);
//		System.exit(-1);
		DensityMap densityMap =
				new DensityMap(numTimeBoxes, numRateBoxes, 0,
						minRate, maxTreeHeight, maxRate);
		for (RootedTree tree : treeList) {
			addTreeToDensityMap(densityMap, tree);
		}
		return densityMap;
	}