#!/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('t / s') plt.ylabel('h / 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()