added functions to PlotResPhase.py