The following code works nicely in my notebook.
img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]],
[[0, 255, 0], [0, 0, 255], [255, 0, 0]],
[[0, 255, 255], [255, 0, 255], [0, 255, 0]]
], dtype=np.uint8)
fig_matrix = go.FigureWidget(go.Image(z=img_rgb))
fig.show()
I would like to update the trace of the figure, and have tried something like
img_rgb_2 = np.array([[[0, 0, 0], [0, 255, 0], [0, 0, 255]],
[[0, 0, 0], [0, 0, 255], [255, 0, 0]],
[[0, 255, 255], [255, 0, 255], [0, 255, 0]]
], dtype=np.uint8)
fig_matrix.update_traces(z=img_rgb_2)
which does not work. How do I update the trace of fig_matrix
?