fix for #375 (#377)
Some checks failed
docker-build / platform-excludes (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled

* fix for #375

* comment
This commit is contained in:
Normann 2025-01-14 13:27:51 +01:00 committed by GitHub
parent 30cb51846d
commit 85bbe0b094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@ import textwrap
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.optimization.genetic import OptimizationParameters
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):