Skip to content

Commit

Permalink
feat(config): global configuration for ing_matplotlib_theme
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed May 10, 2022
1 parent e546994 commit c81e28f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions popmon/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ def get_stat_description(name: str):
# the backend from default (loki) to 'multiprocessing' or 'threading'.
# (see https://joblib.readthedocs.io/en/latest/generated/joblib.Parallel.html for details)
parallel_args = {"n_jobs": multiprocessing.cpu_count()}

# Usage the `ing_matplotlib_theme`
themed = True
7 changes: 5 additions & 2 deletions popmon/visualization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@
import numpy as np
import pandas as pd
import pybase64
from ing_theme_matplotlib import mpl_style
from matplotlib import pyplot as plt

import popmon.config
from popmon.resources import templates_env

NUM_NS_DAY = 24 * 3600 * int(1e9)

logger = logging.getLogger()
mpl_style(dark=False)
if popmon.config.themed:
from ing_theme_matplotlib import mpl_style

mpl_style(dark=False)


def plt_to_str(fig, format="png"):
Expand Down

0 comments on commit c81e28f

Please sign in to comment.