stochkin.style

Publication-quality Matplotlib style configuration.

Publication-quality Matplotlib style for stochkin.

The defaults reproduce the look-and-feel of the FES_2D.ipynb analysis notebook (Arial font, inward ticks, 300 dpi, single-column figure width, …). Two entry-points are provided:

Quick start:

import stochkin as sk
sk.set_publication_style()          # global
# or
with sk.publication_style():        # scoped
    fig, ax = plt.subplots()
    ...
stochkin.style.set_publication_style(rc_overrides=None)[source]

Apply the stochkin publication rcParams globally.

Parameters:

rc_overrides (dict, optional) – Extra key/value pairs that override the defaults.

Return type:

None

stochkin.style.publication_style(rc_overrides=None)[source]

Context manager that temporarily applies the publication style.

On exit, the previous rcParams are restored:

with publication_style():
    fig, ax = plt.subplots()
    ...
Parameters:

rc_overrides (dict | None)