public void setSubSpaceParametersForBrushing(int dim1, int dim2, int minThreshold) {

		int brushAxis;

        HashMap<Point2D, ArrayList<Integer>> clumpingMap = data.getAxisPair(dim1, dim2, parallelDisplay).getClumpingMap(numBins, minThreshold);

		//chosen Axis 1- first axis, 2 - second axis
		ArrayList<Integer> brushedRecordsList = new ArrayList<Integer>();

		Iterator iter = clumpingMap.keySet().iterator();

		//System.err.println("SIZE ************************************* " + clumpingMap.keySet().size());
		while(iter.hasNext()){

			Point2D.Float key = (Point2D.Float)iter.next();
			System.err.println("Chosen axis " + key.x);

			if(key.x == 1)
				brushAxis = dim1;
			else 
				brushAxis = dim2;

			float startBin = key.y;
			ArrayList<Integer> neighBorsList = clumpingMap.get(key);

			//	System.err.println("Number of neighbors  " + clumpingMap.get(key).size());
			Brush selectionBrush = new Brush(parallelDisplay.getNumRecords(), Color.red);

			HashMap<Integer, HashMap<Integer,Float>> pixelMapForData = parallelDisplay.getMap();

			HashMap<Integer, Float> binDataMapPerDimension = pixelMapForData.get(brushAxis);

			Iterator binIter = binDataMapPerDimension.keySet().iterator();



			while(binIter.hasNext())
			{

				Integer recordNum = (Integer)binIter.next();
				Float value = binDataMapPerDimension.get(recordNum);

				float v = value.floatValue();

				int intv = (int)v;

				//System.err.println(" BInned val  " + value + "Bin number  " + startBin);
				if(intv == startBin)
				{   

					brushedRecordsList.add(recordNum);	
					// add the neighboring points as well, modify this

					for(int i=0; i<neighBorsList.size(); i++)
					{
						while(binIter.hasNext())
						{
							recordNum = (Integer)binIter.next();
							value = binDataMapPerDimension.get(recordNum);
							v = value.floatValue();
							intv = (int)v;

							int searchBin = neighBorsList.get(i);
							//recordNum = recordNum +i;
							if( searchBin == intv)
								brushedRecordsList.add(recordNum);	

						}
					}

				}
			}

			System.err.println("Brushed Records List ++++++++++++++++++  " +brushedRecordsList.size());

			for(int brushedRecord: brushedRecordsList)
			{
				parallelDisplay.setCurrentBrush(selectionBrush);
				selectionBrush.setBrushValue(brushedRecord, 1);


			}

			parallelDisplay.repaint();



		}
	}