wilmerags commited on
Commit
a27bca6
·
1 Parent(s): 40dee02

fix: Switch variable used for plotting

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -57,11 +57,8 @@ def draw_interactive_scatter_plot(
57
  n_colors = len(set(values_color_set))
58
  if n_colors not in Pallete:
59
  Palette = AuxPallete
60
- st.write(n_colors)
61
- st.write(values_color_set)
62
- st.write(values_set)
63
  p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
64
- colors = factor_cmap("label", palette=[Pallete[n_colors][ix] for ix, id_ in enumerate(values_color_set)], factors=values_set)
65
  p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
66
  p.axis.visible = False
67
  p.xgrid.grid_line_dash = "dashed"
 
57
  n_colors = len(set(values_color_set))
58
  if n_colors not in Pallete:
59
  Palette = AuxPallete
 
 
 
60
  p = figure(plot_width=800, plot_height=800, tools=[hover], title='2D visualization of tweets', background_fill_color="#fafafa")
61
+ colors = factor_cmap("label", palette=[Pallete[n_colors][int(id_) + 1] for id_ in values_set], factors=values_set)
62
  p.circle("x", "y", size=12, source=source, fill_alpha=0.4, line_color=colors, fill_color=colors)
63
  p.axis.visible = False
64
  p.xgrid.grid_line_dash = "dashed"