Spaces:
Build error
Build error
test: Trying to place legend outside or better
Browse files
app.py
CHANGED
@@ -105,16 +105,19 @@ def draw_interactive_scatter_plot(
|
|
105 |
Palette = AuxPallete
|
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 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors, legend_group="original_label")
|
109 |
p.axis.visible = False
|
110 |
p.xgrid.grid_line_dash = "dashed"
|
111 |
p.ygrid.grid_line_dash = "dashed"
|
112 |
# p.xgrid.grid_line_color = None
|
113 |
# p.ygrid.grid_line_color = None
|
114 |
-
|
115 |
-
p.legend.location = "bottom_right"
|
116 |
-
p.legend.title = "Topics ID"
|
117 |
-
p.legend.background_fill_alpha = 0.2
|
118 |
|
119 |
disclaimer = Label(x=0, y=0, x_units="screen", y_units="screen",
|
120 |
text_font_size="14px", text_color="gray",
|
|
|
105 |
Palette = AuxPallete
|
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 |
+
p.legend.location = "right"
|
110 |
+
p.legend.title = "Topics ID"
|
111 |
+
p.legend.click_policy = "mute"
|
112 |
+
p.legend.background_fill_alpha = 0.2
|
113 |
+
|
114 |
p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors, legend_group="original_label")
|
115 |
p.axis.visible = False
|
116 |
p.xgrid.grid_line_dash = "dashed"
|
117 |
p.ygrid.grid_line_dash = "dashed"
|
118 |
# p.xgrid.grid_line_color = None
|
119 |
# p.ygrid.grid_line_color = None
|
120 |
+
p.toolbar.logo = None
|
|
|
|
|
|
|
121 |
|
122 |
disclaimer = Label(x=0, y=0, x_units="screen", y_units="screen",
|
123 |
text_font_size="14px", text_color="gray",
|