MCPcopy Create free account
hub / github.com/Gabesarch/ICAL / plot_3d

Function plot_3d

TEACh/utils/plot_utils.py:256–274  ·  view source on GitHub ↗
(xdata, ydata, zdata, color=None, b_min=-5, b_max=5, view=(45, 45))

Source from the content-addressed store, hash-verified

254 return fig, axs
255
256def plot_3d(xdata, ydata, zdata, color=None, b_min=-5, b_max=5, view=(45, 45)):
257 plt.figure(1); plt.clf()
258 fig, ax = plt.subplots(subplot_kw={"projection": "3d"}, dpi=200)
259 ax.view_init(view[0], view[1])
260
261 if b_min is None:
262 b_min = np.min(np.concatenate([xdata,ydata,zdata], axis=0))
263 if b_max is None:
264 b_max = np.max(np.concatenate([xdata,ydata,zdata], axis=0))
265
266 ax.set_xlim(b_min, b_max)
267 ax.set_ylim(b_min, b_max)
268 ax.set_zlim(b_min, b_max)
269
270 # z is vertical axis, while for us vertical is y
271 ax.scatter3D(xdata, zdata, ydata, c=ydata, cmap='jet', s=0.1)
272 ax.set_xlabel("x axis")
273 ax.set_ylabel("z axis")
274 ax.set_zlabel("y axis")
275
276def plot_object_tracks(samples, unique_obj_instance, boxes,B,S,M,W,H, idx=0):
277 image_mean = torch.tensor([0.485,0.456,0.406]).reshape(1,1,3,1,1).to(device)

Callers 1

get_multiview_xyzMethod · 0.90

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected