Trying to make trajectory graph work