bilby.core.utils.plotting.latex_plot_format

bilby.core.utils.plotting.latex_plot_format(func)[source]

Wrap the plotting function to set rcParams dependent on environment variables

The rcparams can be set directly from the env. variable BILBY_STYLE to point to a matplotlib style file. Or, if BILBY_STYLE=default (any case) a default setup is used, this is enabled by default. To not use any rcParams, set BILBY_STYLE=none. Occasionally, issues arrise with the latex mathdefault command. A fix is to define this command in the rcParams. An env. variable BILBY_MATHDEFAULT can be used to turn this fix on/off. Setting BILBY_MATHDEFAULT=1 will enable the fix, all other choices (including undefined) will disable it. Additionally, the BILBY_STYLE and BILBY_MATHDEFAULT arguments can be passed into any latex_plot_format-wrapped plotting function and will be set directly.