def font_size(num):
    """ Discrete selection of font size for plot scalling. """
    if num < 40:
        return 16
    elif num < 100:
        return 12
    elif num < 150:
        return 10
    elif num < 350:
        return 8
    else:
        return 5