some plotting and spectrum creation routines