From e079927b849bb43b1b1bc750cc33735c857e56cd Mon Sep 17 00:00:00 2001 From: Aloma Blanch Date: Thu, 16 Jul 2020 21:34:00 -0500 Subject: [PATCH] Fixedn the time between restars plot --- functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions.py b/functions.py index e46f8d3..28265d5 100644 --- a/functions.py +++ b/functions.py @@ -146,7 +146,10 @@ def inlet_flow_waveform(project_folder,t_btw_rst,N_ts,dt,T_cyc,n_cyc): ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) # Adding label to the points - time = ['$t_1$', '$t_2$', '$t_3$', '$t_4$', '$t_5$', '$t_6$'] + + time = [] + for i in range(0,np.unique(np.round(t_pts,3)).shape[0]): + time.append('$t_'+str(i+1)+'$') for x, y, t in zip(t_pts[(-n_cyc-1):], Q_pts[(-n_cyc-1):], time): plt.text(x, y, t, transform=trans_offset, fontsize=12) plt.show()