Spaces:
Sleeping
Sleeping
Commit
·
ca9fc66
1
Parent(s):
53f9124
Update dynamic_shap_plot.py
Browse files- dynamic_shap_plot.py +4 -2
dynamic_shap_plot.py
CHANGED
@@ -74,7 +74,9 @@ def summary_plot_plotly_fig(shap_values, df_shap, feature_names, max_display = 8
|
|
74 |
#plotly_fig['data'][i]['text'] = t
|
75 |
plotly_fig['data'][i]['hoverinfo'] = 'text'
|
76 |
plotly_fig['data'][i]['text'] = df_shap.index
|
77 |
-
plotly_fig['data'][i]['y'] =
|
|
|
|
|
78 |
|
79 |
colorbar_trace = go.Scatter(x=[None],
|
80 |
y=[None],
|
@@ -95,7 +97,7 @@ def summary_plot_plotly_fig(shap_values, df_shap, feature_names, max_display = 8
|
|
95 |
plotly_fig['layout']['width']=500
|
96 |
|
97 |
plotly_fig['layout']['xaxis'].update(zeroline=True, showline=True, ticklen=4, showgrid=False)
|
98 |
-
plotly_fig['layout']['yaxis'].update(dict(visible=
|
99 |
plotly_fig.add_trace(colorbar_trace)
|
100 |
plotly_fig.layout.update(
|
101 |
annotations=[dict(
|
|
|
74 |
#plotly_fig['data'][i]['text'] = t
|
75 |
plotly_fig['data'][i]['hoverinfo'] = 'text'
|
76 |
plotly_fig['data'][i]['text'] = df_shap.index
|
77 |
+
plotly_fig['data'][i]['y'] = [t] * len(df_shap.index)
|
78 |
+
#plotly_fig['data'][i]['y'] = feature_names[feature_order]
|
79 |
+
|
80 |
|
81 |
colorbar_trace = go.Scatter(x=[None],
|
82 |
y=[None],
|
|
|
97 |
plotly_fig['layout']['width']=500
|
98 |
|
99 |
plotly_fig['layout']['xaxis'].update(zeroline=True, showline=True, ticklen=4, showgrid=False)
|
100 |
+
plotly_fig['layout']['yaxis'].update(dict(visible=True))
|
101 |
plotly_fig.add_trace(colorbar_trace)
|
102 |
plotly_fig.layout.update(
|
103 |
annotations=[dict(
|