Initial structure of the plotState function