import matplotlib.pyplot as plt

def spectra(n1, n2):
    rh = 1.097e7
    inv_lambda = rh * ((1 / (n1**2)) - (1 / (n2**2)))
    wavelength = 1 / inv_lambda * 1e9
    return wavelength

n1 = 1
n2 = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
wave = [spectra(n1, n) for n in n2]

plt.figure(figsize=(10, 2))
for w in wave:
    plt.axvline(x=w, color='red', linestyle='-', linewidth=1)
plt.xlabel('Wavelength (nm)')
plt.title('Lyman Series')
plt.show()