correct iteration in plot

This was reported by Thomas Baldwin at
https://github.com/sympy/sympy/issues/2563