Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Use of react!] #497

Open
jake-w-liu opened this issue Jan 13, 2025 · 0 comments
Open

[Use of react!] #497

jake-w-liu opened this issue Jan 13, 2025 · 0 comments

Comments

@jake-w-liu
Copy link

The correct method of using react! is

react!(fig, fig.plot.data, fig.plot.layout)

but I found that using

react!(fig.plot, fig.plot.data, fig.plot.layout)

does not have a method error. And also using redraw! doesn't update the plot.

The following is the code I used for the test:

using PlotlyJS
x = [1, 2, 3]
y = [1, 4, 7]
tr = scatter(x=x, y=y,)
fig = plot(tr)

# change data
fig.plot.data[1][:y][3] = 0 # == y[3] = 0
react!(fig.plot, fig.plot.data, fig.plot.layout) # not correct, but no error text in the terminal
redraw!(fig) # also does not update the plot
display(fig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant