From e393c4cd494efce97a320e60fcded98bee9e980c Mon Sep 17 00:00:00 2001 From: Ron Shnapp Date: Tue, 29 Oct 2024 21:42:00 +0200 Subject: [PATCH] changed animating color scale --- myptv/makePlots/plot_trajectories.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/myptv/makePlots/plot_trajectories.py b/myptv/makePlots/plot_trajectories.py index 6250749..f5c8924 100755 --- a/myptv/makePlots/plot_trajectories.py +++ b/myptv/makePlots/plot_trajectories.py @@ -8,7 +8,7 @@ """ from pandas import read_csv -from numpy import ptp, array, arange, amin, amax +from numpy import ptp, array, arange, amin, amax, percentile import matplotlib.pyplot as plt from moviepy.video.io.bindings import mplfig_to_npimage @@ -216,13 +216,16 @@ def animate(self): ''' #self.prepare_for_animation() - self.vscale = 0 + v_lst = [] for i in self.longs: tr = self.trajectories[i] dt = int(self.min_length/2) dx = sum([(tr[dt,j] - tr[0,j])**2 for j in [1,2,3]])**0.5 - if self.vscale