function toLog(v, clip) {
        if(v > 0) return Math.log(v) / Math.LN10;

        else if(v <= 0 && clip && ax.range && ax.range.length === 2) {
            // clip NaN (ie past negative infinity) to LOG_CLIP axis
            // length past the negative edge
            var r0 = ax.range[0];
            var r1 = ax.range[1];
            return 0.5 * (r0 + r1 - 2 * LOG_CLIP * Math.abs(r0 - r1));
        } else return BADNUM;
    }
Define the conversion functions for an axis data is used in 5 ways:

 d: data, in whatever form it's provided
 c: calcdata: turned into numbers, but not linearized
 l: linearized - same as c except for log axes (and other nonlinear
     mappings later?) this is used when we need to know if it's
     *possible* to show some data on this axis, without caring about
     the current range
 p: pixel value - mapped to the screen with current size and zoom
 r: ranges, tick0, and annotation positions match one of the above
    but are handled differently for different types:
    - linear and date: data format (d)
    - category: calcdata format (c), and will stay that way because
      the data format has no continuous mapping
    - log: linearized (l) format
      TODO: in v3.0 we plan to change it to data format. At that point
      shapes will work the same way as ranges, tick0, and annotations
      so they can use this conversion too.

Creates/updates these conversion functions, and a few more utilities
like cleanRange, and makeCalcdata

also clears ._minDtick, ._forceTick0