From 6650a4aa763c69b7ffa4da2f446e2e76dc26008e Mon Sep 17 00:00:00 2001 From: smathot Date: Thu, 24 Nov 2022 16:27:49 +0100 Subject: [PATCH] Only keep relevant columns in plot - Reduces memory consumption --- time_series_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/time_series_test.py b/time_series_test.py index 74002c8..ba92f9e 100644 --- a/time_series_test.py +++ b/time_series_test.py @@ -12,7 +12,7 @@ import re from collections import namedtuple -__version__ = '0.7.1' +__version__ = '0.7.2' DEFAULT_HUE_COLORMAP = 'Dark2' DEFAULT_ANNOTATION_COLORMAP = 'brg' DEEP_ORANGE = ['#bf360c', '#e64a19', '#ff5722', '#ff8a65', '#ffccbc'] @@ -94,7 +94,6 @@ def find(dm, formula, groups, re_formula=None, winlen=1, split=4, 'The fit_method keyword is deprecated. Use fit_kwargs instead', DeprecationWarning) fit_kwargs['method'] = fit_method - print('xx') dm = _trim_dm(dm, formula, groups, re_formula) with warnings.catch_warnings(): if suppress_convergence_warnings: @@ -216,6 +215,12 @@ def plot(dm, dv, hue_factor, results=None, linestyle_factor=None, hues=None, annotation_linestyle: str, optional The linestyle for the annotations. """ + cols = [dv] + if hue_factor is not None: + cols.append(hue_factor) + if linestyle_factor is not None: + cols.append(linestyle_factor) + dm = dm[cols] if hues is None: hues = DEFAULT_HUE_COLORMAP if isinstance(hues, str):