Proper figure clearing for HMM window