-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbottom_analysis.py
39 lines (36 loc) · 1.65 KB
/
bottom_analysis.py
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
35
36
37
38
39
import numpy as np
import matplotlib.pyplot as plt
data_init = np.loadtxt('./bottom1.txt')
data_middle = np.loadtxt('./bottom2.txt')
data_end = np.loadtxt('./bottom3.txt')
def plot(data_init, data_middle, data_end):
plt.figure(figsize=(10, 4))
plt.style.use('seaborn')
plt.subplot(1, 3, 1)
plt.vlines(x=0, ymin=0, ymax=4.5, colors='black', ls=':',)
plt.plot(data_init[:,-2], data_init[:, 2], marker='o')
plt.plot(data_init[:,-2], data_init[:,4], marker='*')
plt.plot(data_init[:,-2], data_init[:,6], marker='*')
plt.ylim((0, 4.5))
plt.legend(['Training domain: C', 'Training domain: P', 'Training domain: R'])
plt.title(r'(a) Start with bottom eigenvectors')
plt.subplot(1, 3, 2)
plt.ylim((0, 4.5))
plt.vlines(x=200, ymin=0, ymax=4.5, colors='black', ls=':',)
plt.plot(data_middle[:,-2], data_middle[:, 2], marker='o')
plt.plot(data_middle[:,-2], data_middle[:,4], marker='*')
plt.plot(data_middle[:,-2], data_middle[:,6], marker='*')
plt.legend(['Training domain: C', 'Training domain: P', 'Training domain: R'])
plt.title(r'(b) Switch to bottom eigenvectors')
plt.subplot(1, 3, 3)
plt.ylim((0, 4.5))
plt.vlines(x=500, ymin=0, ymax=4.5, colors='black', ls=':',)
plt.plot(data_end[:,-2], data_end[:, 2], marker='o')
plt.plot(data_end[:,-2], data_end[:,4], marker='*')
plt.plot(data_end[:,-2], data_end[:,6], marker='*')
plt.legend(['Training domain: C', 'Training domain: P', 'Training domain: R'])
plt.title(r'(c) No bottom eigenvectors')
plt.tight_layout()
plt.savefig('./bottom_vector.png')
plt.savefig('./bottom_vector.pdf')
plot(data_init, data_middle, data_end)