Update my_pages/ica.py
Browse files- my_pages/ica.py +4 -4
my_pages/ica.py
CHANGED
|
@@ -81,8 +81,8 @@ def render():
|
|
| 81 |
ax.text(*vertices[0], "Intentional", ha="center", va="bottom")
|
| 82 |
ax.text(*vertices[1], "Conventional", ha="right", va="top")
|
| 83 |
ax.text(*vertices[2], "Arbitrary", ha="left", va="top")
|
| 84 |
-
ax.scatter(point[0], point[1], c="white", s=
|
| 85 |
-
ax.scatter(point[0], point[1], c="orange", s=
|
| 86 |
ax.set_aspect("equal")
|
| 87 |
ax.axis("off")
|
| 88 |
|
|
@@ -99,14 +99,14 @@ def render():
|
|
| 99 |
(0.8, 0.5, "Example E"),
|
| 100 |
]
|
| 101 |
|
| 102 |
-
torch_radius = 0.
|
| 103 |
|
| 104 |
# Illuminate nearby points
|
| 105 |
for (x, y, label) in locations:
|
| 106 |
dist = np.linalg.norm([x - point[0], y - point[1]])
|
| 107 |
if dist <= torch_radius:
|
| 108 |
ax.scatter(x, y, c="red", s=50, zorder=6)
|
| 109 |
-
ax.text(x, y + 0.03, label, ha="center", va="bottom", color="
|
| 110 |
|
| 111 |
st.pyplot(fig)
|
| 112 |
|
|
|
|
| 81 |
ax.text(*vertices[0], "Intentional", ha="center", va="bottom")
|
| 82 |
ax.text(*vertices[1], "Conventional", ha="right", va="top")
|
| 83 |
ax.text(*vertices[2], "Arbitrary", ha="left", va="top")
|
| 84 |
+
ax.scatter(point[0], point[1], c="white", s=10000)
|
| 85 |
+
ax.scatter(point[0], point[1], c="orange", s=10000, zorder=5, alpha=0.3)
|
| 86 |
ax.set_aspect("equal")
|
| 87 |
ax.axis("off")
|
| 88 |
|
|
|
|
| 99 |
(0.8, 0.5, "Example E"),
|
| 100 |
]
|
| 101 |
|
| 102 |
+
torch_radius = 0.177 # how far the "torch" illuminates
|
| 103 |
|
| 104 |
# Illuminate nearby points
|
| 105 |
for (x, y, label) in locations:
|
| 106 |
dist = np.linalg.norm([x - point[0], y - point[1]])
|
| 107 |
if dist <= torch_radius:
|
| 108 |
ax.scatter(x, y, c="red", s=50, zorder=6)
|
| 109 |
+
ax.text(x, y + 0.03, label, ha="center", va="bottom", color="red", zorder=6)
|
| 110 |
|
| 111 |
st.pyplot(fig)
|
| 112 |
|