def update_label(old_label, exponent_text):
    """
    Update an axis label with scientific notation using LaTeX formatting for the
    order of magnitude.
    """
    if exponent_text == "":
        return old_label
    try:
        units = old_label[old_label.index("(") + 1:old_label.rindex(")")]
    except ValueError:
        units = ""
    label = old_label.replace("({})".format(units), "")
    exponent_text = exponent_text.replace(r"$\times$", "")
    return "{} ({} {})".format(label, exponent_text, units)