added plotting function to analysis file, simplified actual analysis lines to those associated with output functions