2020-05-19 16:01:52 +02:00
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
2020-05-15 00:07:04 +02:00
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import numpy as np
|
|
|
|
|
import sys
|
|
|
|
|
|
2020-06-01 15:46:25 +02:00
|
|
|
|
|
2020-05-24 22:04:31 +02:00
|
|
|
|
table = np.loadtxt(sys.stdin, unpack=True, skiprows=2, delimiter='|')
|
|
|
|
|
calls, I_MC, σ_MC, I_MI, σ_MI, I_VE, σ_VE, chi = table
|
2020-05-15 00:07:04 +02:00
|
|
|
|
exact = 1.7182818285
|
|
|
|
|
|
|
|
|
|
plt.figure()
|
2020-06-01 15:46:25 +02:00
|
|
|
|
# plt.figure(figsize=(5, 3))
|
|
|
|
|
# plt.rcParams['font.size'] = 8
|
|
|
|
|
|
2020-05-15 00:07:04 +02:00
|
|
|
|
plt.title('Plain MC', loc='right')
|
|
|
|
|
plt.ylabel('$I^{oss}$')
|
|
|
|
|
plt.xlabel('calls')
|
2020-05-24 22:04:31 +02:00
|
|
|
|
plt.xscale('log')
|
2020-05-15 00:07:04 +02:00
|
|
|
|
|
2020-06-01 15:46:25 +02:00
|
|
|
|
plt.axhline(y=exact, color='#c556ea', linestyle='-', label='Exact value')
|
|
|
|
|
plt.errorbar(calls, I_MC, linestyle='', marker='o', yerr=σ_MC,
|
|
|
|
|
color='#92182b', label='Plain MC')
|
|
|
|
|
plt.errorbar(calls, I_MI, linestyle='', marker='o', yerr=σ_MI,
|
|
|
|
|
color='black', label='MISER')
|
|
|
|
|
plt.errorbar(calls, I_VE, linestyle='', marker='o', yerr=σ_VE,
|
|
|
|
|
color='gray', label='VEGAS')
|
2020-05-15 00:07:04 +02:00
|
|
|
|
plt.legend()
|
2020-06-01 15:46:25 +02:00
|
|
|
|
|
|
|
|
|
# plt.tight_layout()
|
|
|
|
|
# plt.savefig('notes/images/5-test.pdf')
|
2020-05-15 00:07:04 +02:00
|
|
|
|
plt.show()
|