33 lines
930 B
Python
33 lines
930 B
Python
import numpy as np
|
|
from matplotlib import pyplot as plt
|
|
|
|
or1 = [10, 11, 12, 13, 14]
|
|
or2 = [12.14, 13.35, 14.57, 15.79, 17]
|
|
energy = [600, 650, 700, 750, 800, 850, 900, 950]
|
|
markers = ["^", "+", "s", "D", "."]
|
|
|
|
data = np.loadtxt("test/eff.txt")
|
|
data = data.reshape(10, 8)
|
|
data = data / 10000
|
|
|
|
plt.figure(dpi=400)
|
|
|
|
ax = plt.subplot(1, 1, 1)
|
|
for k in range(5):
|
|
ax.scatter(energy, data[k], label="{:d}cm".format(or1[k]), marker=markers[k])
|
|
ax.legend(loc="lower left")
|
|
ax.set_xlabel("Energy [keV]", fontsize=15)
|
|
ax.set_ylabel("Efficiency", fontsize=15)
|
|
|
|
# ax = plt.subplot(2, 1, 2)
|
|
# for k in range(5):
|
|
# ax.scatter(energy, data[k + 5], label="{:.2f}cm".format(or2[k]), marker=markers[k])
|
|
# ax.legend(loc="lower left")
|
|
# ax.set_xlabel("Energy [keV]", fontsize=15)
|
|
# ax.set_ylabel("Efficiency", fontsize=15)
|
|
|
|
plt.tight_layout()
|
|
plt.subplots_adjust()
|
|
# plt.show()
|
|
plt.savefig("/home/fox/Documents/Thesis/figures/chap3/Fig3.png")
|