wilmerags commited on
Commit
aecdaab
1 Parent(s): a1feb32

feat: Improve circle colors

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -54,7 +54,8 @@ def draw_interactive_scatter_plot(
54
  source = ColumnDataSource(data=dict(x=xs, y=ys, text=texts, label=values_list, original_label=labels_list))
55
  hover = HoverTool(tooltips=[(text_column, "@text{safe}"), (label_column, "@original_label")])
56
  p = figure(plot_width=800, plot_height=800, tools=[hover])
57
- p.circle("x", "y", size=10, source=source, fill_alpha=0.4, fill_color=factor_cmap("label", palette=[Pallete[int(id_)] for id_ in values_color_set], factors=values_set))
 
58
  p.axis.visible = False
59
  p.xgrid.grid_line_color = None
60
  p.ygrid.grid_line_color = None
 
54
  source = ColumnDataSource(data=dict(x=xs, y=ys, text=texts, label=values_list, original_label=labels_list))
55
  hover = HoverTool(tooltips=[(text_column, "@text{safe}"), (label_column, "@original_label")])
56
  p = figure(plot_width=800, plot_height=800, tools=[hover])
57
+ colors = factor_cmap("label", palette=[Pallete[int(id_)] for id_ in values_color_set], factors=values_set)
58
+ p.circle("x", "y", size=10, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
59
  p.axis.visible = False
60
  p.xgrid.grid_line_color = None
61
  p.ygrid.grid_line_color = None