diff --git a/src/akkudoktoreos/utils/visualize.py b/src/akkudoktoreos/utils/visualize.py index 35877ab3..3c63ab38 100644 --- a/src/akkudoktoreos/utils/visualize.py +++ b/src/akkudoktoreos/utils/visualize.py @@ -5,6 +5,7 @@ from collections.abc import Sequence from typing import Callable, Optional, Union +import matplotlib import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np @@ -17,6 +18,9 @@ from akkudoktoreos.utils.datetimeutil import to_datetime logger = get_logger(__name__) +matplotlib.use( + "Agg" +) # non-interactive backend that can only write to files, backend needed to stay in main thread. class VisualizationReport(ConfigMixin):