updated plotting.py