add macro to plot spectra