Start to untangle plot.py (preparation for fixing #33).