Created function to plot tsd spectrograms based on iv