Refactor functions used to generate the trace plot
Refactor functions used to generate the trace plot

This pulls several functions from the notebook that have been used to
generate the trace plot. These are pretty stable and are used in the 2.x
and master branches.

DudLab/nanshe_workflow,nanshe-org/nanshe_workflow