utility right plot python code