-
Notifications
You must be signed in to change notification settings - Fork 0
/
figures.py
executable file
·85 lines (66 loc) · 2.13 KB
/
figures.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
import numpy as np
from matplotlib import pyplot as plt
import matplotlib
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
with open('dat.aho') as f:
dat = np.array([[float(x) for x in l.split()] for l in f.readlines()])
plt.figure(figsize=(5,3), dpi=300)
# Plot exact
cond = dat[:,1] == -1
d = dat[cond,:]
plt.plot(d[:,0], d[:,3], color='#000000')
# Plot (4,0) bound
cond = (dat[:,1] == 4) * (dat[:,2] == 0)
d = dat[cond,:]
plt.fill_between(d[:,0], d[:,3], d[:,4], color='#000000', alpha=0.1)
# Plot (4,1) bound
#cond = (dat[:,1] == 4) * (dat[:,2] == 1)
#d = dat[cond,:]
#plt.fill_between(d[:,0], d[:,3], d[:,4], color='#550000', alpha=0.2)
# Plot (4,3) bound
cond = (dat[:,1] == 4) * (dat[:,2] == 3)
d = dat[cond,:]
plt.fill_between(d[:,0], d[:,3], d[:,4], color='#550000', alpha=0.2)
# Plot (9,0) bound
#cond = (dat[:,1] == 9) * (dat[:,2] == 0)
#d = dat[cond,:]
#plt.fill_between(d[:,0], d[:,3], d[:,4], color='#000066', alpha=0.3)
# Plot (9,1) bound
#cond = (dat[:,1] == 9) * (dat[:,2] == 1)
#d = dat[cond,:]
#plt.fill_between(d[:,0], d[:,3], d[:,4], color='#008800', alpha=0.4)
# Plot (9,2) bound
#cond = (dat[:,1] == 9) * (dat[:,2] == 2)
#d = dat[cond,:]
#plt.fill_between(d[:,0], d[:,3], d[:,4], color='#000000', alpha=0.5)
# Plot (9,3) bound
cond = (dat[:,1] == 9) * (dat[:,2] == 3)
d = dat[cond,:]
plt.fill_between(d[:,0], d[:,3], d[:,4], color='#000000', alpha=0.5)
plt.xlabel('$T$')
plt.ylabel('$\\langle x(T)\\rangle$')
#plt.ylim([-0.08, 0.08])
plt.ylim([-1.0, 1.0])
plt.xlim([0,5])
plt.tight_layout()
plt.savefig("aho.png")
with open('dat.hubbard') as f:
dat = np.array([[float(x) for x in l.split()] for l in f.readlines()])
plt.figure(figsize=(5,3), dpi=300)
# Plot exact
cond = dat[:,1] == -1
d = dat[cond,:]
plt.plot(d[:,0], d[:,3], color='#000000')
# Plot (4,0) bound
#cond = (dat[:,1] == 4) * (dat[:,2] == 0)
#d = dat[cond,:]
#plt.fill_between(d[:,0], d[:,3], d[:,4], color='#000000', alpha=0.1)
plt.xlabel('$T$')
plt.ylabel('$\\langle x(T)\\rangle$')
#plt.ylim([-0.08, 0.08])
plt.ylim([-2.0, 2.0])
plt.xlim([0,10])
plt.tight_layout()
plt.savefig("hubbard.png")