plot routine did not properly account for the dimension of error arrays leading to invalid index errors