public static void newDensity() {
		
		double[][] density = calculateDensity();
		int numGridLines = getNumGridlines();
		
		// Find the maximum normalized density
		float maxDens = (float) 0.0;
		for (int x1Ind = 0; x1Ind < numGridLines; x1Ind++) {
			
			for (int x2Ind = 0; x2Ind < numGridLines; x2Ind++) {
				if (density[x1Ind][x2Ind] > maxDens) {
					maxDens = (float) density[x1Ind][x2Ind];
				}
				
				// PDF to CDF conversion
				if (Settings.useCDF) {
					density[x1Ind][x2Ind] *= Math.pow(Settings.discretization,  2);
					
					if (x1Ind == 0) {
						
						if (x2Ind != 0) {
							density[x1Ind][x2Ind] += density[x1Ind][x2Ind - 1];
						}
						
					}
					
					else {
						if (x2Ind != 0) {
							density[x1Ind][x2Ind] += density[x1Ind - 1][x2Ind] + density[x1Ind][x2Ind - 1];
							density[x1Ind][x2Ind] -= density[x1Ind - 1][x2Ind - 1];
						}
						
					}
					
					maxDens = 1;
				} // End CDF conversion
				
			}
		}
		
		// Store this density distribution to be used in calculating post probability score
		if (Settings.postProbOn) {
			oldDensity = density;
		}
		
		// Calculate and print the mutual information
		if (Settings.useMutual) {
			displayMutualInformation(density, numGridLines);
		}
		
		// Update the plot's density
		DensityModel.updateDensity(density, maxDens);
	}