Returns a formatted domain.
@param {Array} domain: a domain in the form of a two element array
@param {Object} props: the props object
@param {String} axis: the current axis
@returns {Array} a domain in the form of a two element array
function formatDomain(domain, props, axis) {
  return cleanDomain(padDomain(domain, props, axis), props, axis);
}