code for plotting results of categorical decoder from psd