Multiple Object Tracking
When an object disappears momentarily form the scene (either it goes out of frame and comes back later, or is occluded by other objects) you can track up to the point where it becomes untrackable, then add a new tracker for other sections of the video when the object reappears. Then just select the trackers and merge them with the Join Track button



That way Blender knows that is not dealing with a new object, but the same one.

Once you are done traking your objects go to the solve section/geometry and select "Link Empty to Track".

That will create empties on the 3D environment that follow the movement set by the trackers. From there you should be able to create the graphs you are after.