From a38578ab8df402fe427339c4c5e9c20a422acce4 Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Wed, 24 Jul 2024 10:00:59 +0200 Subject: [PATCH] Add argument `color_initial` To function `plot_single_traj`. --- Trajectories/Analysis/plot_traj.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Trajectories/Analysis/plot_traj.py b/Trajectories/Analysis/plot_traj.py index 4ab1be02..c8fc05f1 100755 --- a/Trajectories/Analysis/plot_traj.py +++ b/Trajectories/Analysis/plot_traj.py @@ -33,12 +33,25 @@ def get_extr_coord(traj, e_overestim, SHPC, orientation): def plot_single_traj( - traj, e_overestim, SHPC, orientation, ax, src_crs, annotate_flag, color + traj, + e_overestim, + SHPC, + orientation, + ax, + src_crs, + annotate_flag, + color, + color_initial, ): x, y = get_extr_coord(traj, e_overestim, SHPC, orientation) ax.plot(x, y, color, linewidth=0.5, transform=src_crs) ax.plot( - x[0], y[0], marker="s", markersize=2, color="green", transform=src_crs + x[0], + y[0], + marker="s", + markersize=2, + color=color_initial, + transform=src_crs, ) if annotate_flag: @@ -130,6 +143,7 @@ if __name__ == "__main__": src_crs, args.annotate, color="red", + color_initial="green", ) break else: @@ -144,6 +158,7 @@ if __name__ == "__main__": src_crs, args.annotate, color="red", + color_initial="green", ) else: if args.min_duration == 1: @@ -157,6 +172,7 @@ if __name__ == "__main__": src_crs, args.annotate, color="red", + color_initial="green", ) else: # args.min_duration > 1 @@ -177,6 +193,7 @@ if __name__ == "__main__": src_crs, args.annotate, color="red", + color_initial="green", ) print( -- GitLab