@@ -2621,7 +2621,7 @@ def graphical_cme(self,
2621
2621
2622
2622
def gui (self ,
2623
2623
station : str | None = None ,
2624
- timeseries : list [str ] | None = None ,
2624
+ timeseries : str | list [str ] | None = None ,
2625
2625
fit_list : list [str ] | None = None ,
2626
2626
sum_models : bool = True ,
2627
2627
verbose : bool = False ,
@@ -2670,7 +2670,7 @@ def gui(self,
2670
2670
station
2671
2671
Pre-select a station.
2672
2672
timeseries
2673
- List of strings with the descriptions of the timeseries to plot.
2673
+ String or list of strings with the descriptions of the timeseries to plot.
2674
2674
``None`` defaults to all timeseries.
2675
2675
fit_list
2676
2676
List of strings containing the model names of the subset of the models
@@ -2758,6 +2758,15 @@ def gui(self,
2758
2758
gui_kw_args
2759
2759
Override default GUI settings of :attr:`~disstans.config.defaults`.
2760
2760
"""
2761
+
2762
+ # check the timeseries setting
2763
+ if isinstance (timeseries , str ):
2764
+ timeseries = [timeseries ]
2765
+ else :
2766
+ assert (timeseries is None ) or (isinstance (timeseries , list ) and
2767
+ all ([isinstance (t , str ) for t in timeseries ])), \
2768
+ f"'timeseries' must be None, a string, or list of strings, got '{ timeseries } '."
2769
+
2761
2770
# create map and timeseries figures
2762
2771
gui_settings = defaults ["gui" ].copy ()
2763
2772
gui_settings .update (gui_kw_args )
0 commit comments