final static String rationalizeTickSize(String tick)
  {
	int digitPos;
	int dotIndex;
	long tickPart;

	dotIndex = tick.indexOf('.');

	if (dotIndex == -1)
	{
	  return tick;
	}

	String decimals = tick.substring(dotIndex + 1);
	String intPart = tick.substring(0, dotIndex);

	for (digitPos = 0; decimals.charAt(digitPos) == '0'; digitPos++)
	{
	  ;
	}
	digitPos++;

	if (decimals.length() > digitPos)
	{
	  tickPart = Math.round(Double.parseDouble(decimals.charAt(digitPos - 1) + "." + decimals.charAt(digitPos)));
	}
	else
	{
	  tickPart = Long.parseLong(decimals.substring(digitPos - 1));
	}

	if (tickPart >= 10)
	{
	  decimals = decimals.substring(0, digitPos - 2) + tickPart;
	}
	else
	{
	  decimals = decimals.substring(0, digitPos - 1) + tickPart;
	}

	return intPart + "." + decimals;
  }