pnkraemer / tueplots

Figure sizes, font sizes, fonts, and more configurations at minimal overhead. Fix your journal papers, conference proceedings, and other scientific publications.
https://tueplots.readthedocs.io
MIT License
663 stars 25 forks source link

Fontsize flexibility #97

Closed pnkraemer closed 2 years ago

pnkraemer commented 2 years ago

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,
    }
philipphennig commented 2 years ago

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