Pulled plotting of mean+error envelopes out into a utility function.