MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / update

Function update

text2motion/utils/plot_script.py:79–109  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

77 # print(trajec.shape)
78
79 def update(index):
80 # print(index)
81 ax.lines = []
82 ax.collections = []
83 ax.view_init(elev=120, azim=-90)
84 ax.dist = 7.5
85 # ax =
86 plot_xzPlane(MINS[0] - trajec[index, 0], MAXS[0] - trajec[index, 0], 0, MINS[2] - trajec[index, 1],
87 MAXS[2] - trajec[index, 1])
88 # ax.scatter(data[index, :22, 0], data[index, :22, 1], data[index, :22, 2], color='black', s=3)
89
90 if index > 1:
91 ax.plot3D(trajec[:index, 0] - trajec[index, 0], np.zeros_like(trajec[:index, 0]),
92 trajec[:index, 1] - trajec[index, 1], linewidth=1.0,
93 color='blue')
94 # ax = plot_xzPlane(ax, MINS[0], MAXS[0], 0, MINS[2], MAXS[2])
95
96 for i, (chain, color) in enumerate(zip(kinematic_tree, colors)):
97 # print(color)
98 if i < 5:
99 linewidth = 4.0
100 else:
101 linewidth = 2.0
102 ax.plot3D(data[index, chain, 0], data[index, chain, 1], data[index, chain, 2], linewidth=linewidth,
103 color=color)
104 # print(trajec[:index, 0].shape)
105
106 plt.axis('off')
107 ax.set_xticklabels([])
108 ax.set_yticklabels([])
109 ax.set_zticklabels([])
110
111 ani = FuncAnimation(fig, update, frames=frame_number, interval=1000 / fps, repeat=False)
112

Callers

nothing calls this directly

Calls 1

plot_xzPlaneFunction · 0.85

Tested by

no test coverage detected