Spaces:
Build error
Build error
fix: Fix enumerate usage for color setting
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def draw_interactive_scatter_plot(
|
|
61 |
st.write(values_color_set)
|
62 |
st.write(values_set)
|
63 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
64 |
-
colors = factor_cmap("label", palette=[Pallete[n_colors][
|
65 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
|
66 |
p.axis.visible = False
|
67 |
p.xgrid.grid_line_dash = "dashed"
|
|
|
61 |
st.write(values_color_set)
|
62 |
st.write(values_set)
|
63 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
64 |
+
colors = factor_cmap("label", palette=[Pallete[n_colors][ix] for ix, id_ in enumerate(values_color_set)], factors=values_set)
|
65 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
|
66 |
p.axis.visible = False
|
67 |
p.xgrid.grid_line_dash = "dashed"
|