separated out plotting functions into an analysis script