-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathplot-angle.py
More file actions
executable file
·32 lines (27 loc) · 864 Bytes
/
plot-angle.py
File metadata and controls
executable file
·32 lines (27 loc) · 864 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
#!/usr/bin/env python3
import json
import os
from collections import defaultdict
from glob import glob
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
mpl.rcParams.update({"font.size": 16})
# plt.rcParams["figure.figsize"] = (8, 6)
plt.rcParams["font.family"] = "Times New Roman"
del mpl.font_manager.weight_dict["roman"]
mpl.font_manager._rebuild()
for err_key in ["err_normal"]:
plt.figure()
plt.title("Normal Error of Symmetry Planes")
for npz in sorted(glob(f"results/*.npz")):
with np.load(npz) as f:
err = f[err_key]
_, label = os.path.split(npz)
print(npz, len(err))
plt.plot(err, (1 + np.arange(len(err))) / len(err), label=label[1:-4])
plt.grid(True)
plt.xlim([0, 5])
plt.ylabel("Percentage")
plt.legend(loc="lower right")
plt.show()