REFACTOR give all plotting scripts a more general interface