aboutsummaryrefslogtreecommitdiff
path: root/fullswof-utils
diff options
context:
space:
mode:
Diffstat (limited to 'fullswof-utils')
-rwxr-xr-xfullswof-utils/specificPoints.py23
1 files changed, 19 insertions, 4 deletions
diff --git a/fullswof-utils/specificPoints.py b/fullswof-utils/specificPoints.py
index 03bdfe7..0f27911 100755
--- a/fullswof-utils/specificPoints.py
+++ b/fullswof-utils/specificPoints.py
@@ -3,17 +3,32 @@
import matplotlib.pyplot as plt
import numpy as np
import os
+import sys
from matplotlib.ticker import MultipleLocator
def detach_display():
+ fig, ax = plt.subplots()
t, x, y, h, u, v = np.loadtxt(
'hu_specific_points.dat', delimiter='\t', unpack=True)
- fig, ax = plt.subplots()
- plt.plot(t,h, label='elevation')
plt.xlabel('time / s')
plt.ylabel('water height / m')
- ax.yaxis.set_minor_locator(MultipleLocator(0.2))
- plt.grid(True, which='minor')
+ plt.plot(t,h, label='elevation')
+ #ax.yaxis.set_minor_locator(MultipleLocator(200))
+ #plt.grid(True, which='minor')
+
+ def on_press(event):
+ #print('press', event.key)
+ #sys.stdout.flush()
+ if event.key == 'x':
+ plt.clf()
+ t, x, y, h, u, v = np.loadtxt(
+ 'hu_specific_points.dat', delimiter='\t', unpack=True)
+ plt.xlabel('time / s')
+ plt.ylabel('water height / m')
+ plt.plot(t,h, label='elevation')
+ fig.canvas.draw()
+ fig.canvas.mpl_connect('key_press_event', on_press)
+
plt.show()
if os.fork():