Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed italicised Units in sdec_plot #1446

Merged
merged 3 commits into from
Feb 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tardis/widgets/sdec_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,13 +873,17 @@ def generate_plot_mpl(

# Set legends and labels
self.ax.legend(fontsize=12)
self.ax.set_xlabel(r"Wavelength $[\AA]$", fontsize=12)
self.ax.set_xlabel(r"Wavelength $[\mathrm{\AA}]$", fontsize=12)
if distance: # Set y-axis label for flux
self.ax.set_ylabel(
r"$F_{\lambda}$ [erg/s/cm^{2}/$\AA$]", fontsize=12
r"$F_{\lambda}$ [erg $\mathrm{s^{-1}}$ $\mathrm{cm^{-2}}$ $\mathrm{\AA^{-1}}$]",
fontsize=12,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some confusion about what to change on the axis labels - I didn't help things with a vague comment, but I am not proposing any change to the actual label - just that the Angstrom unit is no longer italicised. The comment posted was just grabbed from one of my programs illustrating how to use mathrm. Can this be reverted back to F_lambda?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, No Issues but the F_lambda & L_lambda will be italicised ... I will update the screenshots with the same :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flux
image

)
else: # Set y-axis label for luminosity
self.ax.set_ylabel(r"$L_{\lambda}$ [erg/s/$\AA$]", fontsize=12)
self.ax.set_ylabel(
r"$L_{\lambda}$ [erg $\mathrm{s^{-1}}$ $\mathrm{\AA^{-1}}$]",
fontsize=12,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - roll back to L_lambda

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, No problems :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Luminosity
image


return plt.gca()

Expand Down