pnkraemer / tueplots

Figure sizes, font sizes, fonts, and more configurations at minimal overhead. Fix your journal papers, conference proceedings, and other scientific publications.

Home Page:https://tueplots.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unified API

pnkraemer opened this issue · comments

I think at the moment, this API is not perfectly unified. For example, the functions in figsize return tuples, almost all other function return dictionaries compatible with plt.rcParams.update or plt.rc_context, and there are the context functions that compute the context straightaway.

In my opinion, it would be way more intuitive if all functions (except for the RBG constants in color) would return outputs of the same types: dicts compatible with the plt.rcParam functions. This would entail the following changes

  • context.py becomes something like bundles.py: the bundling functionality (i.e., all icml configs in one) remain there, but they can now be called flexibly with either plt.rc_context or plt.rcParams.update
  • figsize.py would return a dictionary with a figure.figsize key, which can then be called straightforwardly.