Spaces:
Build error
Build error
test: Legend placing for topics
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ def draw_interactive_scatter_plot(
|
|
106 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
107 |
colors = factor_cmap("label", palette=[Pallete[n_colors][int(id_) + 1] for id_ in values_set], factors=values_set)
|
108 |
|
109 |
-
legend = Legend(
|
110 |
# p.legend.location = "right"
|
111 |
# p.legend.title = "Topics ID"
|
112 |
# p.legend.click_policy = "mute"
|
|
|
106 |
p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
|
107 |
colors = factor_cmap("label", palette=[Pallete[n_colors][int(id_) + 1] for id_ in values_set], factors=values_set)
|
108 |
|
109 |
+
legend = Legend(source=source, legend_group='original_label', title='Topics ID', click_policy='mute', background_fill_alpha=0.2)
|
110 |
# p.legend.location = "right"
|
111 |
# p.legend.title = "Topics ID"
|
112 |
# p.legend.click_policy = "mute"
|