Skip to content

Commit

Permalink
feat: use the latest updated curve labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Lan Le committed Nov 24, 2023
1 parent d332b03 commit cea4527
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions chem_spectra/model/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def tf_combine(self, list_file_names=None):

plt.rcParams['figure.figsize'] = [16, 9]
plt.rcParams['font.size'] = 14
curve_idx = self.params.get('jcamp_idx', 0)

for idx, file in enumerate(self.multiple_files):
tf = store_str_in_tmp(file.core)
Expand All @@ -300,10 +301,11 @@ def tf_combine(self, list_file_names=None):
filename = 'DESORPTION'
marker = 'v'
plt.plot(xs, ys, label=filename, marker=marker)

# PLOT label
plt.xlabel("X ({})".format(nicp.core.label['x']), fontsize=18)
plt.ylabel("Y ({})".format(nicp.core.label['y']), fontsize=18)

if (idx == curve_idx):
# PLOT label
plt.xlabel("X ({})".format(nicp.core.label['x']), fontsize=18)
plt.ylabel("Y ({})".format(nicp.core.label['y']), fontsize=18)
tf.close()

plt.legend()
Expand Down

0 comments on commit cea4527

Please sign in to comment.