prakharg24 commited on
Commit
6166157
·
verified ·
1 Parent(s): 088f34a

Update my_pages/ica.py

Browse files
Files changed (1) hide show
  1. my_pages/ica.py +8 -2
my_pages/ica.py CHANGED
@@ -3,6 +3,8 @@ import matplotlib.pyplot as plt
3
  import numpy as np
4
  from utils import go_to
5
 
 
 
6
  def render():
7
  st.markdown(
8
  """
@@ -74,15 +76,19 @@ def render():
74
 
75
  # Plot
76
  fig, ax = plt.subplots()
77
- ax.plot(*np.append(vertices, [vertices[0]], axis=0).T, 'k-')
78
  ax.scatter(vertices[:,0], vertices[:,1], c=["blue", "green", "red"], s=100)
79
  ax.text(*vertices[0], "Intentional", ha="center", va="bottom")
80
  ax.text(*vertices[1], "Conventional", ha="right", va="top")
81
  ax.text(*vertices[2], "Arbitrary", ha="left", va="top")
82
- ax.scatter(point[0], point[1], c="orange", s=200, zorder=5)
 
83
  ax.set_aspect("equal")
84
  ax.axis("off")
85
 
 
 
 
86
  st.pyplot(fig)
87
 
88
  # Display interpretation
 
3
  import numpy as np
4
  from utils import go_to
5
 
6
+ plt.style.use('dark_background')
7
+
8
  def render():
9
  st.markdown(
10
  """
 
76
 
77
  # Plot
78
  fig, ax = plt.subplots()
79
+ ax.plot(*np.append(vertices, [vertices[0]], axis=0).T)
80
  ax.scatter(vertices[:,0], vertices[:,1], c=["blue", "green", "red"], s=100)
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=2000)
85
+ ax.scatter(point[0], point[1], c="orange", s=2000, zorder=5, alpha=0.2)
86
  ax.set_aspect("equal")
87
  ax.axis("off")
88
 
89
+ fig.patch.set_alpha(0)
90
+ ax.patch.set_alpha(0)
91
+
92
  st.pyplot(fig)
93
 
94
  # Display interpretation