wilmerags commited on
Commit
085853b
·
1 Parent(s): d71c853

feat: Improve background and adding title to the plot

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def draw_interactive_scatter_plot(
53
  labels_list = labels.astype(str).tolist()
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
 
53
  labels_list = labels.astype(str).tolist()
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], title='2D visualization of tweets', background_fill_color="#fafafa")
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