Балаганский Никита Николаевич commited on
Commit
71691d8
1 Parent(s): b11cf8a

add scatter tip lines

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -115,7 +115,16 @@ def main():
115
  "y": [y_s[plot_idx]],
116
  "mode": "markers"
117
  })
118
- figure = go.Figure(data=[scatter, scatter_tip], layout=layout)
 
 
 
 
 
 
 
 
 
119
  figure.update_layout(paper_bgcolor="#FFFFFF", plot_bgcolor='#FFFFFF', showlegend="false")
120
  st.plotly_chart(figure)
121
  auth_token = os.environ.get('TOKEN') or True
 
115
  "y": [y_s[plot_idx]],
116
  "mode": "markers"
117
  })
118
+ scatter_tip_lines = go.Scatter({
119
+ "x": [0, x_s[plot_idx]],
120
+ "y": [y_s[plot_idx]] * 2,
121
+ "mode": "lines",
122
+ "line": {
123
+ "color": "grey",
124
+ "dash": "dash"
125
+ }
126
+ })
127
+ figure = go.Figure(data=[scatter, scatter_tip, scatter_tip_lines], layout=layout)
128
  figure.update_layout(paper_bgcolor="#FFFFFF", plot_bgcolor='#FFFFFF', showlegend="false")
129
  st.plotly_chart(figure)
130
  auth_token = os.environ.get('TOKEN') or True