fix the empty panel bug in gate plot