1
1
# SPDX-License-Identifier: Apache-2.0
2
2
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
3
3
# SPDX-FileContributor: Alexandre Benedicto
4
-
4
+ from logging import Logger
5
5
from typing import Any
6
6
7
7
import pandas as pd # type: ignore[import-untyped]
8
- from geos .utils .Logger import Logger , getLogger
9
8
from matplotlib import axes , figure , lines # type: ignore[import-untyped]
10
9
from matplotlib .font_manager import ( # type: ignore[import-untyped]
11
10
FontProperties , # type: ignore[import-untyped]
17
16
18
17
class Figure2DGenerator :
19
18
20
- def __init__ ( self : Self , dataframe : pd .DataFrame , userChoices : dict [ str , list [ str ] ] ) -> None :
19
+ def __init__ ( self : Self , dataframe : pd .DataFrame , userChoices : dict [ str , list [ str ] ], logger : Logger ) -> None :
21
20
"""Utility to create cross plots using Python View.
22
21
23
22
We want to plot f(X) = Y where in this class,
@@ -26,14 +25,15 @@ def __init__( self: Self, dataframe: pd.DataFrame, userChoices: dict[ str, list[
26
25
Args:
27
26
dataframe (pd.DataFrame): data to plot
28
27
userChoices (dict[str, list[str]]): user choices.
28
+ logger (Logger): Logger to use.
29
29
"""
30
30
self .m_dataframe : pd .DataFrame = dataframe
31
31
self .m_userChoices : dict [ str , Any ] = userChoices
32
32
self .m_fig : figure .Figure
33
33
self .m_axes : list [ axes ._axes .Axes ] = []
34
34
self .m_lines : list [ lines .Line2D ] = []
35
35
self .m_labels : list [ str ] = []
36
- self .m_logger : Logger = getLogger ( "Python View Configurator" )
36
+ self .m_logger : Logger = logger
37
37
38
38
try :
39
39
# apply minus 1 multiplication on certain columns
0 commit comments