improvements for plotting the errors