Outline full routine for analyze & plotting