formating graph