code: public void drawDistances(Graphics g1){
  		Graphics2D g = (Graphics2D)g1;
  
  		int c = matrix.getRowDimension();
  		int d = matrix.getColumnDimension();
  
  		float scale = getScale();
  		int width = Math.round(scale);
  
  		for (int i = 0; i < c; i++) {
  			int ipaint = Math.round(i*scale);
  
  			for (int j = 0; j < d; j++) {
  				double val = matrix.get(i,j);
  
  				int jpaint = Math.round(j*scale);
  
  				Color color = cellColor.getColor(val);
  				g.setColor(color);
  
  				g.fillRect(ipaint,jpaint,width,width);
  			}
  
  		}
  
  	}
docs: For each element in matrix, draw it as a colored square or pixel.
  
  The color of a matrix element with value x is specified as
  - H: 1-x/scalevalue
  - S: saturation
  - B: 1-x/scalevalue
  @param g1