import matplotlib.pyplot as plt
import numpy as np
import astropy.units as u

from dust_attenuation.shapes import SBL18

fig, ax = plt.subplots()

# generate the curves and plot them
x = np.arange(0.5,10,0.1)/u.micron

slopes = [-1, -0.5, 0, 0.5, 1]
for slope in slopes:
    att_model = SBL18(Av=1,ampl=3.5,slope=slope)
    ax.plot(x,att_model(1/x),label=r'$\delta$ = %.2f' % (slope))

ax.set_xlabel('$x$ [$\mu m^{-1}$]')
ax.set_ylabel('A(x) [mag]')

ax.legend(loc='best')
plt.title("SBL18 with varying slopes")
plt.show()