subprocess call refactor, plotting bug fix