wilmerags commited on
Commit
51f54ce
·
1 Parent(s): e5b5cd8

test: Improving alpha for readability

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -106,12 +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(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"
113
- # p.legend.background_fill_alpha = 0.2
114
-
115
  p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors, legend_group="original_label")
116
  p.axis.visible = False
117
  p.xgrid.grid_line_dash = "dashed"
@@ -119,6 +114,10 @@ def draw_interactive_scatter_plot(
119
  # p.xgrid.grid_line_color = None
120
  # p.ygrid.grid_line_color = None
121
  p.toolbar.logo = None
 
 
 
 
122
 
123
  disclaimer = Label(x=0, y=0, x_units="screen", y_units="screen",
124
  text_font_size="14px", text_color="gray",
 
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.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors, legend_group="original_label")
111
  p.axis.visible = False
112
  p.xgrid.grid_line_dash = "dashed"
 
114
  # p.xgrid.grid_line_color = None
115
  # p.ygrid.grid_line_color = None
116
  p.toolbar.logo = None
117
+
118
+ p.legend.location = "right"
119
+ p.legend.title = "Topics ID"
120
+ p.legend.background_fill_alpha = 0.25
121
 
122
  disclaimer = Label(x=0, y=0, x_units="screen", y_units="screen",
123
  text_font_size="14px", text_color="gray",