-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph.py
More file actions
34 lines (29 loc) · 792 Bytes
/
graph.py
File metadata and controls
34 lines (29 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import numpy as np
import matplotlib.pyplot as plt
A = np.genfromtxt("jacobiData.txt")
B = np.genfromtxt("seidelData.txt")
C = np.genfromtxt("sorData.txt")
plt.figure(1)
plt.contourf(A,100)
plt.title('2D Heat Transfer (Jacobi)')
plt.xlabel('dx')
plt.ylabel('dy')
#plt.gca().invert_xaxis()
plt.rcParams.update({'font.size': 22})
plt.colorbar()
plt.gca().set_aspect('equal', adjustable='box')
#plt.figure(2)
#plt.contourf(B,100)
#plt.gca().invert_yaxis()
#plt.title('2D Heat Transfer (Gauss Seidel)')
#plt.xlabel('dx')
#plt.ylabel('dy')
#plt.rcParams.update({'font.size': 22})
#plt.figure(3)
#plt.contourf(C,100)
#plt.gca().invert_yaxis()
#plt.title('2D Heat Transfer (Successive Overrelaxation SOR)')
#plt.xlabel('dx')
#plt.ylabel('dy')
#plt.rcParams.update({'font.size': 22})
plt.show()