xj = m_JRand.nextDouble(); yj = m_JRand.nextDouble();
xj = m_JRand.nextGaussian(); yj = m_JRand.nextGaussian();
    private void paintData(Graphics gx) {      double maxErr = Double.NEGATIVE_INFINITY;      double minErr = Double.POSITIVE_INFINITY;      double xj=0;      double yj=0;      /*      // determine range of error for numeric predictions if necessary      if (m_preds != null 	  && m_predsNumeric 	  && (m_plotInstances.classIndex() >= 0)) {	int cind = m_plotInstances.classIndex();	double err;	for (int jj=0;jj<m_plotInstances.numInstances();jj++) {	  err = Math.abs(m_preds[jj] - m_plotInstances.instance(jj).value(cind));	  if (err < minErr) {	    minErr = err;	  }	  if (err > maxErr) {	    maxErr = err;	  }	}	} */      for (int i=0;i<m_plotInstances.numInstances();i++) {	if (m_plotInstances.instance(i).isMissing(m_xIndex) ||	    m_plotInstances.instance(i).isMissing(m_yIndex)) {	} else {	  if (m_JitterVal > 0) {	    xj = m_JRand.nextDouble();	    yj = m_JRand.nextDouble();	  }	  /*	  double x = convertToPanelX(m_plotInstances.				     instance(i).value(m_xIndex),xj);	  double y = convertToPanelY(m_plotInstances.	  instance(i).value(m_yIndex),yj); */	  double x = (m_pointLookup[i][0] + m_pointLookup[i][3]);	  double y = (m_pointLookup[i][1] + m_pointLookup[i][4]);	  if (m_plotInstances.attribute(m_cIndex).isNominal() || 	      m_colourUsingPreds) {	    // if the cIndex is less than 0 then we are visualizing	    // a clusterer's predictions and therefore the dataset has	    // no apriori class to use for colouring	    int ci = (!m_colourUsingPreds) 	      ? (int)(m_plotInstances.instance(i).value(m_cIndex)) % 10	      : (int)(m_preds[i] % 10);	      	    int mp = (!m_colourUsingPreds)	      ? (int)(m_plotInstances.instance(i).value(m_cIndex) / 10)	      : (int)(m_preds[i] / 10);	    	    mp *= 2;	    Color pc = m_DefaultColors[ci];	    for (int j=0;j<mp;j++) {	      pc = pc.brighter();	    }	    	    gx.setColor(pc);	    	    drawDataPoint(x,y,2,0,gx);	    if (m_preds != null 		&& !m_predsNumeric 		&& (m_plotInstances.classIndex() >= 0)) {	      if (m_preds[i] != 		  m_plotInstances.instance(i).		  value(m_plotInstances.classIndex())) {		ci = (int)(m_preds[i] % 10);		mp = (int)(m_preds[i] / 10);		mp *= 2;		pc = m_DefaultColors[ci];		for (int j=0;j<mp;j++) {		  pc = pc.brighter();		}				gx.setColor(pc);		drawDataPoint(x,y,(int)m_pointLookup[i][2],1,gx);		//		gx.drawRect((int)(x-3),(int)(y-3),6,6);		//ci = (int)(m_plotInstances.instance(i).value(m_plotInstances.classIndex()) % 10);	      }	    }    	  } else {	    int maxpSize = 20;	    if (m_preds != null 		&& m_plotInstances.classIndex() >= 0 		&& m_predsNumeric) {	      /*	      double err = Math.abs((m_preds[i] -				     m_plotInstances.instance(i).				     value(m_plotInstances.classIndex())));				     err = ((err - minErr)/(maxErr - minErr)) * maxpSize; */	      double r = (m_plotInstances.instance(i).			  value(m_cIndex) - m_minC) /		          (m_maxC - m_minC);	      r = (r * 240) + 15;	      gx.setColor(new Color((int)r,0,(int)(255-r)));	      drawDataPoint(x,y,(int)m_pointLookup[i][2],0,gx);	    } else {	      double r = (m_plotInstances.instance(i).value(m_cIndex) - m_minC) /		(m_maxC - m_minC);	      r = (r * 240) + 15;	      gx.setColor(new Color((int)r,0,(int)(255-r)));	      drawDataPoint(x,y,2,0,gx);	    }	  }	}      }    }