plotting stuff for memd and decoder