prakharg24 commited on
Commit
efed36e
·
verified ·
1 Parent(s): ddfebf6

Update my_pages/ica.py

Browse files
Files changed (1) hide show
  1. my_pages/ica.py +4 -1
my_pages/ica.py CHANGED
@@ -120,7 +120,10 @@ def render():
120
  dist = np.linalg.norm([x - point[0], y - point[1]])
121
  if dist <= torch_radius:
122
  ax.scatter(x, y, c="red", s=50, zorder=6)
123
- ax.text(x, y + 0.03, label, ha=ha, va=va, color="red", zorder=6, weight="heavy")
 
 
 
124
  explanations.append((label, labeltext))
125
  else:
126
  ax.scatter(x, y, c="red", s=50, zorder=6, alpha=0.3)
 
120
  dist = np.linalg.norm([x - point[0], y - point[1]])
121
  if dist <= torch_radius:
122
  ax.scatter(x, y, c="red", s=50, zorder=6)
123
+ if va=="bottom":
124
+ ax.text(x, y + 0.03, label, ha=ha, va=va, color="red", zorder=6, weight="heavy")
125
+ elif va=="top":
126
+ ax.text(x, y - 0.03, label, ha=ha, va=va, color="red", zorder=6, weight="heavy")
127
  explanations.append((label, labeltext))
128
  else:
129
  ax.scatter(x, y, c="red", s=50, zorder=6, alpha=0.3)