update tg-mode for TGraph 3 format