Fixes #682.
Update plotting.py

Fix for Python2.7
Merge pull request #828 from surbas/patch-1

Fixes #682.