code: private double calculateScale(int height) {
  		double newScale = 0.0;
  		double max = (double) getMaximum();
  		double ht = (double) height;
  		newScale = ((ht - 50.0)) / max;
  		return newScale;
  	}
docs: Returns the scaling factor necessary to allow all of the traces to fit vertically
  into the specified space.
  
  @param height - required height in pixels
  @return - scaling factor