def auto_log(vmin, vmax):
    """
  Deduce whether the log scale should be used or not, judging from given range.

  >>> auto_log(0, 10)  # has zero, don't.
  False
  >>> auto_log(0.0, 1.0)  # has zero, don't.
  False
  >>> auto_log(-1.0, 1.0)  # has negative, don't.
  False
  >>> auto_log(1E-4, 1E1)  # positive & wide, do it.
  True
  >>> auto_log(10, 50)  # arbitary, don't
  False

  >>> ## If both are not initialize (e.g., null-stats), return None 
  >>> ## in order to have same default as QHist.xlog
  >>> auto_log( 10, None ) is None
  True
  >>> auto_log( None, 100 ) is None
  True
  >>> auto_log( None, None ) is None
  True

  """
    if vmin is None or vmax is None:
        return None
    if vmin == 0.0 and vmax == 1.0:
        return False
    if vmin <= 0:
        return False
    if vmax / vmin >= 100.0:
        return True
    return False
