def get_exp_label(val) -> str: 
    """
    :param val: numeric label to format
    :return: label formatted in scientific notation
    
    Format a label in scientific notation, using Latex math font.
    For example, 10000 -> 10^4;
    """
    # Get the power of 10
    exp_val = 0
    remaining_val = int(val)
    while (remaining_val % 10 == 0 and remaining_val > 0):
        exp_val += 1
        remaining_val = remaining_val // 10
    if remaining_val > 1:
        return r"$\mathdefault{" + str(remaining_val) + r"\!·\!{10}^" + str(exp_val) + r"}$"
    else:
        return r"$\mathdefault{" + r"{10}^" + str(exp_val) + r"}$"