import matplotlib.pyplot as plt
from grains2 import amcarbon, amolivine50, Bruggeman

ac = amcarbon()
ao50 = amolivine50()
mix = Bruggeman.mix([ac, ao50], [1, 3])

fig, ax = plt.subplots()
ax.plot(ac.ri.wave, ac.ri.n, label="Amorphous carbon")
ax.plot(ao50.ri.wave, ao50.ri.n, label="Amorphous olivine (Mg/Fe=50/50)")
ax.plot(mix.ri.wave, mix.ri.n, label="Mix")
ax.legend()
plt.setp(ax, xlabel="Wavelength (μm)", ylabel="$n$")