diff --git a/CHANGELOG.md b/CHANGELOG.md index 02718b8b2e..7dd876b32d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ but cannot always guarantee backwards compatibility. Changes that may **break co **Fixed** +- Fixed bug when plotting a probabilistic multivariate series, where all confidence intervals (starting from 2nd component) had the same color as the median line. [#2532](https://github.com/unit8co/darts/pull/2532) by [Dennis Bader](https://github.com/dennisbader). - Fixed a bug when passing an empty array to `TimeSeries.prepend/append_values()` raised an error. [#2522](https://github.com/unit8co/darts/pull/2522) by [Alessio Pellegrini](https://github.com/AlessiopSymplectic) - Fixed a bug with `TimeSeries.prepend/append_values()`, where the name of the (time) index was lost. [#2522](https://github.com/unit8co/darts/pull/2522) by [Alessio Pellegrini](https://github.com/AlessiopSymplectic) - Fixed a bug when using `from_group_dataframe()` with a `time_col` of type integer, where the resulting time index was wrongly converted to a DatetimeIndex. [#2512](https://github.com/unit8co/darts/pull/2512) by [Alessio Pellegrini](https://github.com/AlessiopSymplectic) diff --git a/darts/timeseries.py b/darts/timeseries.py index f0c9fc006d..edadecb422 100644 --- a/darts/timeseries.py +++ b/darts/timeseries.py @@ -4191,8 +4191,6 @@ def plot( central_series = comp.mean(dim=DIMS[2]) alpha = kwargs["alpha"] if "alpha" in kwargs else None - if not self.is_deterministic: - kwargs["alpha"] = 1 if custom_labels: label_to_use = label[i] else: @@ -4204,15 +4202,18 @@ def plot( label_to_use = f"{label}_{comp_name}" kwargs["label"] = label_to_use + kwargs_central = deepcopy(kwargs) + if not self.is_deterministic: + kwargs_central["alpha"] = 1 if central_series.shape[0] > 1: - p = central_series.plot(*args, ax=ax, **kwargs) + p = central_series.plot(*args, ax=ax, **kwargs_central) # empty TimeSeries elif central_series.shape[0] == 0: p = ax.plot( [], [], *args, - **kwargs, + **kwargs_central, ) ax.set_xlabel(self.time_index.name) else: @@ -4221,7 +4222,7 @@ def plot( central_series.values[0], "o", *args, - **kwargs, + **kwargs_central, ) color_used = p[0].get_color() if default_formatting else None