jupyterdash

Plotly-Dash: How to show the same selected area of a figure between callbacks?

落花浮王杯 提交于 2021-01-01 10:59:36
问题 Consider a plotly figure where you can select polynomial features for a line fit using JupyterDash: If you select an area and then choose another number for polynomial features, the figure goes from this: ... and back to this again: So, how can you set things up so that the figure displays the same area of the figure every time you select another number of features and trigger another callback? Complete code: import numpy as np import plotly.express as px import plotly.graph_objects as go

Plotly-Dash: How to show the same selected area of a figure between callbacks?

一曲冷凌霜 提交于 2021-01-01 10:58:52
问题 Consider a plotly figure where you can select polynomial features for a line fit using JupyterDash: If you select an area and then choose another number for polynomial features, the figure goes from this: ... and back to this again: So, how can you set things up so that the figure displays the same area of the figure every time you select another number of features and trigger another callback? Complete code: import numpy as np import plotly.express as px import plotly.graph_objects as go

Plotly-Dash: How to code interactive callbacks for hover functions in plotly dash

邮差的信 提交于 2020-12-13 03:19:18
问题 Is it possible to have a text field at the bottom of a graph in dash that displays the text for the point they are on (showing hover data as plain text). So the text box will be able to make changes when users hover over a certain point. I have defined a dcc.Graph component and the app layout but am not sure how to define the callback function for the hoverdata. I have used the below code to define dcc.Graph and app.layout fig = go.Figure(data=plot_data, layout=plot_layout) app.layout = html