Move PlotView to an inner class so variables available for using in saved state