Changed the plot code to use variables that make sense.