From a66dfd6fbafb10d0954f640feec27ccecf1431ec Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Tue, 19 Apr 2022 21:59:40 +0200
Subject: [PATCH] Bug fix: correct call to `node_to_date_eddy`

---
 Overlap/plot_traj.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Overlap/plot_traj.py b/Overlap/plot_traj.py
index 99e98b16..945134c6 100755
--- a/Overlap/plot_traj.py
+++ b/Overlap/plot_traj.py
@@ -8,6 +8,7 @@ import itertools
 import numpy as np
 from matplotlib import patches
 import cartopy.crs as ccrs
+import report_graph
 
 color_iter = itertools.cycle(('#1f77b4', '#aec7e8', '#ff7f0e',
                               '#ffbb78', '#2ca02c', '#98df8a',
@@ -37,7 +38,8 @@ def is_node_type(G, n, label):
     elif label == "important":
         return G.in_degree[n] == 0 or G.out_degree[n] == 0 or G.degree[n] >= 3
     elif isinstance(label, int):
-        return node_to_date_eddy(n, e_overestim, d_init)["date"] == label
+        return report_graph.node_to_date_eddy(n, G.graph["e_overestim"])\
+            ["date_index"] == label
 
 def plot_nbunch(G, nbunch, color = '#1f78b4', label = None, ax = None):
     if ax is None: ax = plt.gca()
@@ -93,7 +95,6 @@ def animate_nbunch(G, nbunch):
         date += 1
     
 if __name__ == "__main__":
-    import report_graph
     import argparse
     import sys
     from os import path
-- 
GitLab