adding number of guards option to analyze and plot script