public void paintComponent(Graphics gx) {
    super.paintComponent(gx);
    if (m_plotInstances != null 
	&& m_plotInstances.numInstances() > 0
	&& m_plotInstances.numAttributes() > 0) {
      if (m_plotCompanion != null) {
	m_plotCompanion.prePlot(gx);
      }

      m_JRand = new Random(m_JitterVal);
      paintAxis(gx);
      if (m_axisChanged || m_plotResize) {
	int x_range = m_XaxisEnd - m_XaxisStart;
	int y_range = m_YaxisEnd - m_YaxisStart;
	if (x_range < 10) {
	  x_range = 10;
	}
	if (y_range < 10) {
	  y_range = 10;
	}

	m_drawnPoints = new int[x_range + 1][y_range + 1];
	fillLookup();
	m_plotResize = false;
	m_axisChanged = false;
      }
      paintData(gx);
    }
  }