write autoly diagram for picture environment in TeX by using python and tkinter