fix some global variables to be local variables in scatter and line plots