< Back

PyTecplot Link Between Frames


In the release of PyTecplot 1.0, Frame Linking has been implemented in the API. Frame Linking allows users to quickly link attributes of frames together like position, 3D view, and solution time.

To link the view simply implement the following commands on both frames:
for frame in tp.frames():
plot = frame.plot(PlotType.Cartesian3D)
plot.activate()
frame_linking = plot.linking_between_frames
frame_linking.group = 1
frame_linking.link_view = True
frame_linking.link_solution_time = True

This allows all of the frames in 3D Cartesian form to rotate together and the solution times also link when animating.

Furthermore, each command that rotates or increments the solution time only needs to be called on one of the frames. So, instead of looping over each frame you can simply operate once:

plot = frame.plot(PlotType.Cartesian3D)
plot.activate()
plot.solution_timestep += 1
plot.view.translate(x=5)

For more information, see the examples in the PyTecplot documentation.