pnkraemer/tueplots

Fontsize flexibility

pnkraemer opened this issue · 1 comments

Currently, most of the fontsizes are computed via

def _from_base(*, base):
    return {
        "font.size": base - 1,
        "axes.labelsize": base - 1,
        "legend.fontsize": base - 3,
        "xtick.labelsize": base - 3,
        "ytick.labelsize": base - 3,
        "axes.titlesize": base - 1,
    }

which has some fairly generic defaults. It would be very useful for me to be able to change the "1" and "3" values in my application.
For example, via

def _from_base(*, base, normalsize_offset=1, small_offset=3):
    return {
        "font.size": base - normalsize_offset,
        "axes.labelsize": base - normalsize_offset,
        "legend.fontsize": base - small_offset,
        "xtick.labelsize": base - small_offset,
        "ytick.labelsize": base - small_offset,
        "axes.titlesize": base - normalsize_offset,
    }

I agree this would be nice. Done this way it also doesn’t break old code, so it seems like a no-brainier.