File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5+ from typing import Optional
6+
57import matplotlib .pyplot as plt
68
7- from . import _helpers , conf
9+ from . import _helpers
10+ from .config import Config
811from .phyvars import REFSTATE
912from .stagyydata import StagyyData
1013
1114
12- def plot_ref (sdat : StagyyData , var : str ) -> None :
15+ def plot_ref (sdat : StagyyData , var : str , conf : Optional [ Config ] = None ) -> None :
1316 """Plot one reference state.
1417
1518 Args:
1619 sdat: a :class:`~stagpy.stagyydata.StagyyData` instance.
1720 var: refstate variable, a key of :data:`~stagpy.phyvars.REFSTATE`.
1821 """
22+ if conf is None :
23+ conf = Config .default_ ()
1924 fig , axis = plt .subplots ()
2025 adbts = sdat .refstate .adiabats
2126 if len (adbts ) > 2 :
@@ -44,7 +49,9 @@ def cmd() -> None:
4449 conf.core
4550 conf.plot
4651 """
52+ from . import conf
53+
4754 sdat = StagyyData (conf .core .path )
4855
4956 for var in conf .refstate .plot :
50- plot_ref (sdat , var )
57+ plot_ref (sdat , var , conf )
You can’t perform that action at this time.
0 commit comments