In the plotly manual there is some example on this. However, there is no info on same issue while using the dash.
I've tried following this example and create my own example, I don't see the image
img = plt.imread('link1.png')
app.layout = html.Div([
# auto update every 60 msec
dcc.Interval(id='graph-update', interval=5000),
html.Div([
html.Div([
html.H3("Bearing-Depression", style={'text-align': 'center'}),
dcc.Graph(id='f1', figure={})],
className="six columns"),
],
className="row"),
])
@ app.callback([Output('f1', 'figure'),],
[Input('graph-update', 'n_intervals')])
def update(n):
fig2 = px.imshow((img), origin='lower')
fig2.update_xaxes(tickvals=[0, 30, 60, 90, 120,
150, 180, 210, 240, 270, 300, 330, 360])
fig2.update_yaxes(tickvals=[0, 10, 20, 30, 40, 50, 60, 70,
80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180])
data = df[df.condition == "OK"]
fig2.add_trace(go.Scatter(x=data['x'],
y=data['y'],
marker=dict(color='black', symbol='circle'),
name="OK"
))
return fig2
Any suggestion what could be done so that I'll have an image and a scatter plot on same figure?