PFASST++
plot.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 import numpy as np
3 import matplotlib as mpl
4 from matplotlib import pyplot as plt
5 
6 np.loadtxt("vanderpol.txt")
7 data = np.loadtxt("vanderpol.txt")
8 xsol = data[:,0]
9 ysol = data[:,1]
10 dt = 0.2
11 nt = np.size(xsol)
12 t = np.linspace(0, nt*dt, nt)
13 
14 plt.figure(figsize=(8,8))
15 plt.plot(t, xsol, color='red', label='x')
16 plt.plot(t, ysol, color='blue', label='y')
17 plt.xlim(0, t[nt-1])
18 plt.legend()
19 plt.show()