blob: 03bdfe7d47cb080dda250ffe733fc92253e009c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
import os
from matplotlib.ticker import MultipleLocator
def detach_display():
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.show()
if os.fork():
# parent
pass
else:
# child
detach_display()
|