correct iteration in plot

This was reported by Thomas Baldwin at
https://github.com/sympy/sympy/issues/2563
Merge pull request #2564 from smichr/plot

correct iteration in plot