added capability to plot data and convert output to jpg and png to save space