code to plot many spectra, grouped by extinction/EW