fixed plot_traj.py by tests