refactor: setupPlotWindow