Fixed bug in plotting function that did not exclude the year values when calculating the differences of variables