mean, median, and error bar controls

This branch is not ready to review but should facilitate some back and forth with glob to finish the implementation.