Skip to content

Commit

Permalink
added option for keyword arguments in spectrum plot function (#1477)
Browse files Browse the repository at this point in the history
  • Loading branch information
aribalam authored Mar 24, 2021
1 parent 110d8c9 commit f545ede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tardis/montecarlo/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ def luminosity_to_flux(luminosity, distance):
def f_nu_to_f_lambda(self, f_nu):
return f_nu * self.frequency / self.wavelength

def plot(self, ax=None, mode="wavelength"):
def plot(self, ax=None, mode="wavelength", **kwargs):
if ax is None:
from matplotlib.pyplot import gca

ax = gca()
if mode == "wavelength":
ax.plot(self.wavelength.value, self.luminosity_density_lambda.value)
ax.plot(self.wavelength.value, self.luminosity_density_lambda.value, **kwargs)
ax.set_xlabel(
"Wavelength [{}]".format(self.wavelength.unit._repr_latex_())
)
Expand Down

0 comments on commit f545ede

Please sign in to comment.