Skip to content

Commit

Permalink
Ensure alpha symbol used in plot labels
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Feb 19, 2024
1 parent d32a59a commit 74b0183
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 86 deletions.
162 changes: 81 additions & 81 deletions examples/PyTASER_DFT_Example.ipynb

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pytaser/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@ def _rescale_overlapping_curves(list_of_curves):
plt.plot(
energy_mesh[xmin_ind:xmax_ind],
normalised_tas[xmin_ind:xmax_ind],
label="Total TAS (Δα)",
label=r"Total TAS ($\Delta\alpha$)",
color="black",
lw=3.5,
alpha=0.75, # make semi-transparent to show if overlapping lines
)

else: # yaxis = "alpha"
abs_label = "a (a.u.)"
abs_label = r"$\alpha$ (a.u.)"
transition_dict = {} # control transition plotting here rather than later on:
alpha_normalisation_factor = np.max( # normalise to max alpha in dark
np.abs(self.alpha_dark)[xmin_ind:xmax_ind]
Expand All @@ -367,15 +367,15 @@ def _rescale_overlapping_curves(list_of_curves):
- self.alpha_light_dict["emission"][xmin_ind:xmax_ind]
)
/ alpha_normalisation_factor,
label="a (light)",
label=r"$\alpha$ (light)",
color="black",
lw=2.5,
alpha=0.75, # make semi-transparent to show if overlapping lines
)
plt.plot(
energy_mesh[xmin_ind:xmax_ind],
self.alpha_dark[xmin_ind:xmax_ind] / alpha_normalisation_factor,
label="a (dark)",
label=r"$\alpha$ (dark)",
color="blue",
lw=2.5,
alpha=0.75, # make semi-transparent to show if overlapping lines
Expand Down Expand Up @@ -470,7 +470,7 @@ def _rescale_overlapping_curves(list_of_curves):
plt.plot(
energy_mesh[xmin_ind:xmax_ind],
jdos_diff[xmin_ind:xmax_ind],
label="Total TAS (ΔJDOS only)",
label="Total TAS ($\\Delta$JDOS only)",
color="black",
lw=3.5,
alpha=0.75, # make semi-transparent to show if overlapping lines
Expand Down

0 comments on commit 74b0183

Please sign in to comment.