etna
etna copied to clipboard
[BUG] Non-deterministic order of segments during plotting
🐛 Bug Report
If you run ts.plot
on the same dataset in different jupyter sessions, the sequence of segments will be different. May be it will be better if order will be the same each time.
Expected behavior
Order of segments during plotting is the same for all plotting methods that use different plots for each segment.
Probable solution is to make look at plotting functions and sort the segments inside them.
Places to fix:
-
analysis.decomposition.plot_trend
: sortts.segments
-
analysis.forecast.plot_forecast
: sort segments -
analysis.forecast.plot_forecast_decomposition
: sort segments -
datasets.tsdataset.TSDataset.plot
: sort segments
How To Reproduce
- Run
get_started
notebook. - Restart kernel and rerun
get_started
notebook and check that order of segments inplot_forecast
changed.
Environment
No response
Additional context
No response
Checklist
- [X] Bug appears at the latest library version