def METHOD_NAME(self, v):
    """
    Format `v` in in compact exponential, stripping redundant elements
    (pluses, leading and trailing zeros and decimal point, trailing `e`).
    """
    # this is after the matplotlib ScalarFormatter
    # without any i18n
    v = "{:.15e}".format(v)
    if "e" not in v:
        return v  # short number, inf, NaN, -inf
    mantissa, exponent = v.split("e")
    mantissa = mantissa.rstrip("0").rstrip(".")
    exponent_sign = exponent[0].lstrip("+")
    exponent = exponent[1:].lstrip("0")
    return "{:s}e{:s}{:s}".format(mantissa, exponent_sign,
                                  exponent).rstrip("e")