refactor source layout of interactive plots