Skip to content

Commit

Permalink
chore: change axes label for CV layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Lan Le committed Sep 26, 2023
1 parent e4269cb commit 78e6fb7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion chem_spectra/lib/composer/ni.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,15 @@ def tf_img(self):
waveLength = self.core.params['waveLength']
label = "X ({}), WL={} nm".format(self.core.label['x'], waveLength['value'], waveLength['unit']) # noqa: E501
plt.xlabel((label), fontsize=18)
elif (self.core.is_cyclic_volta):
plt.xlabel("{}".format(self.core.label['x']), fontsize=18)
else:
plt.xlabel("X ({})".format(self.core.label['x']), fontsize=18)
plt.ylabel("Y ({})".format(self.core.label['y']), fontsize=18)

if (self.core.is_cyclic_volta):
plt.ylabel("{}".format(self.core.label['y']), fontsize=18)
else:
plt.ylabel("Y ({})".format(self.core.label['y']), fontsize=18)
plt.locator_params(nbins=self.__plt_nbins())
plt.grid(False)
# Save
Expand Down
8 changes: 7 additions & 1 deletion chem_spectra/lib/converter/bagit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,15 @@ def __combine_images(self, list_composer, list_file_names = None):
waveLength = composer.core.params['waveLength']
label = "X ({}), WL={} nm".format(composer.core.label['x'], waveLength['value'], waveLength['unit']) # noqa: E501
plt.xlabel((label), fontsize=18)
elif (composer.core.is_cyclic_volta):
plt.xlabel("{}".format(composer.core.label['x']), fontsize=18)
else:
plt.xlabel("X ({})".format(composer.core.label['x']), fontsize=18)
plt.ylabel("Y ({})".format(composer.core.label['y']), fontsize=18)

if (composer.core.is_cyclic_volta):
plt.ylabel("{}".format(composer.core.label['y']), fontsize=18)
else:
plt.ylabel("Y ({})".format(composer.core.label['y']), fontsize=18)

plt.legend()
tf_img = tempfile.NamedTemporaryFile(suffix='.png')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='chem-spectra-app',
version='0.13.4',
version='0.13.4-patch.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
Expand Down

0 comments on commit 78e6fb7

Please sign in to comment.