How to create a 3d realtime plot by using figurewidget?

Hi guys i am doing trajectory planning using reinforcement learning and for that i want to see how training is going on for that i want to use real time plotting using figurewidget

currently

1)I have a numpy array of 256256256 which has obstacles
2) i want to keep these obstacles and want to add dynamic path points.
3) ia=np.argwhere((img[:,:,:]==1)|(img[:,:,:]==2)|(img[:,:,:]==3))
x1=ia[:,0]
y1=ia[:,1]
z1=ia[:,2]
c=
for i,j,k in zip(x1,y1,z1):
c.append(img[i,j,k])

fig1 = px.scatter_3d(x=x1, y=y1,z=z1,opacity=1.0,color=c,range_x=[0,255],range_y=[0,255],range_z=[0,255])

fig1.update_traces(marker_size = 2)

here i am plotting the numpy image with obstacles

4)fig2 = go.Figure(data=px.scatter_3d(x=path[:,0], y=path[:,1], z=path[:,2],opacity=1.0))

fig2.update_traces(marker_size = 2)
fig3 = go.Figure(data=fig1.data + fig2.data)

fig3.show()

what i want to do is just update the path points on the obstacle plot,how can ido this?