From 9cf5a3ed95bad1442e1fc92d27398062a8cbf5f3 Mon Sep 17 00:00:00 2001 From: Stefano Serafin <serafin@jet01.img.univie.ac.at> Date: Fri, 24 Jan 2025 09:06:02 +0100 Subject: [PATCH] use scatter to plot observations --- observations.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/observations.py b/observations.py index f56413d..7c94e82 100644 --- a/observations.py +++ b/observations.py @@ -77,7 +77,7 @@ if __name__ == '__main__': for i in range(observations.shape[1]): print(ocoords[ntim,i],observations[ntim,i]) - makeplots = False + makeplots = True # Make plots if makeplots: fig, ax1 = p.subplots(1,1,constrained_layout=True) @@ -86,12 +86,13 @@ if __name__ == '__main__': tint = 300 t = np.linspace(0,tint*(ocoords.shape[0]-1),ocoords.shape[0])[:,None]+np.zeros(ocoords.shape) t = t/3600. - c = ax1.pcolormesh(t,ocoords,observations,vmin=290,vmax=296) - ax1.contour(t,ocoords,observations, - np.linspace(290,290+0.003*2000,13), - colors='white', - linestyles='--', - linewidths=0.75) + c = ax1.scatter(t,ocoords,s=5,c=observations,vmin=290,vmax=296) + #c = ax1.pcolormesh(t,ocoords,observations,vmin=290,vmax=296) + #ax1.contour(t,ocoords,observations, + # np.linspace(290,290+0.003*2000,13), + # colors='white', + # linestyles='--', + # linewidths=0.75) ax1.set_ylim([0,2000]) ax1.set_ylabel(r'Height (m)') ax1.set_xlabel(r'Time (s)') -- GitLab