improve plot.py