fix issue of empty plot