What
Tueplots centres around the content of figsizes.py
, fonts.py
, fontsizes.py
, and bundles.py
.
Other modules, namely axes.py
, cycler.py
, and markers.py
, provide easy access to some plot-style changes that are otherwise a bit more involved to update. For example, axes.lines()
changes all linewidths to a consistent base_width
via rcParams
. This functionality is helpful but somewhat opinionated.
Why
I would like to collect modules with such (potentially) opinionated content in a dedicated subpackage, e.g., tueplots.style.*
, to distinguish them from the core content: figure sizes, font sizes, and so on.
This would simplify the API a little bit:
- Make it easier to find the "important" content in the online docs
- Add a new template by adding a function to all of the (then) top-level modules
- Guarantee that the top-level content does not contain any opinionated configurations
- We could split the tutorial notebooks into tutorials for the central content and tutorials for using the
style
(name undecided) subpackage
How
The current API looks like
import matplotlib.pyplot as plt
from tueplots import bundles, axes
plt.rcParams.update(bundles.icml2022())
plt.rcParams.update(axes.lines(base_width=0.75))
The new API would look like
import matplotlib.pyplot as plt
from tueplots import bundles
from tueplots.style import axes
plt.rcParams.update(bundles.icml2022())
plt.rcParams.update(axes.lines(base_width=0.75))
To be decided
Everyone's feedback is welcome!