adapted plotting.py for teffs