Creating a graph typically involves two steps - setting up the graph parameters in a setup procedure, and updating the graph using a repeating procedure driven by a forever button. The above three operations are repeated for the second plot pen. Two similar commands are provided to set the y axis. Again, pp1 and pp2 establish the plot pen that the commands directly following operate on. Often you might decide that the graph doesn't need to updated everytime the graph-it procedure is run.
Explorations Try plotting the average energy level of a turtle population.
Try plotting the average energy for two different groups of turtles, each of which generates it's energy differently.