hamedbabaeigiglou commited on
Commit
3d4b306
Β·
verified Β·
1 Parent(s): 727e73e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -131,7 +131,7 @@ ax1.set_title(f"Top {top_n_val} Ontologies by Complexity Score")
131
  # PANEL 2 β€” PROCESSING TIME VS COMPLEXITY
132
  ax2 = plt.subplot2grid((3, 2), (1, 0))
133
  ax2.scatter(df_out["complexity_score"], df_out["Processing Time (s)"],
134
- alpha=0.4, s=60, edgecolor="black")
135
 
136
  x = df_out["complexity_score"].values
137
  y = df_out["Processing Time (s)"].values
@@ -139,21 +139,25 @@ y = df_out["Processing Time (s)"].values
139
  coeffs = np.polyfit(x, y, 4)
140
  poly = np.poly1d(coeffs)
141
  xs = np.linspace(x.min(), x.max(), 300)
142
- ax2.plot(xs, poly(xs))
143
 
144
  ax2.set_title("Processing Time vs Complexity")
 
 
145
 
146
  # PANEL 3 β€” DISTRIBUTION
147
  ax3 = plt.subplot2grid((3, 2), (1, 1))
148
- ax3.hist(df_out["complexity_score"], bins=20, edgecolor="black", alpha=0.8, density=True)
149
 
150
  values = df_out["complexity_score"].dropna().values
151
  kde = gaussian_kde(values)
152
  xx = np.linspace(values.min(), values.max(), 1000)
153
- ax3.plot(xx, kde(xx), linewidth=1.5)
154
 
155
  ax3.set_title("Distribution of Complexity Scores")
156
- plt.tight_layout()
 
 
157
 
158
  st.pyplot(fig)
159
 
@@ -184,5 +188,4 @@ for j in range(i + 1, len(axes)):
184
  axes[j].axis("off")
185
 
186
  plt.tight_layout(rect=[0, 0, 1, 1])
187
- plt.tight_layout()
188
  st.pyplot(fig)
 
131
  # PANEL 2 β€” PROCESSING TIME VS COMPLEXITY
132
  ax2 = plt.subplot2grid((3, 2), (1, 0))
133
  ax2.scatter(df_out["complexity_score"], df_out["Processing Time (s)"],
134
+ alpha=0.4, s=60, edgecolor="black", linewidth=0.5, color="#DD8452")
135
 
136
  x = df_out["complexity_score"].values
137
  y = df_out["Processing Time (s)"].values
 
139
  coeffs = np.polyfit(x, y, 4)
140
  poly = np.poly1d(coeffs)
141
  xs = np.linspace(x.min(), x.max(), 300)
142
+ ax2.plot(xs, poly(xs), color="#DD8452", linewidth=1.5)
143
 
144
  ax2.set_title("Processing Time vs Complexity")
145
+ ax2.set_xlabel("Complexity Score", fontsize=12)
146
+ ax2.set_ylabel("Processing Time (s)", fontsize=12)
147
 
148
  # PANEL 3 β€” DISTRIBUTION
149
  ax3 = plt.subplot2grid((3, 2), (1, 1))
150
+ ax3.hist(df_out["complexity_score"], bins=20, color="#55A868", edgecolor="black", alpha=0.8, density=True)
151
 
152
  values = df_out["complexity_score"].dropna().values
153
  kde = gaussian_kde(values)
154
  xx = np.linspace(values.min(), values.max(), 1000)
155
+ ax3.plot(xx, kde(xx), linewidth=1.5, color="green")
156
 
157
  ax3.set_title("Distribution of Complexity Scores")
158
+ ax3.set_xlabel("Complexity Score", fontsize=12)
159
+ ax3.set_ylabel("Density", fontsize=12)
160
+ plt.tight_layout(rect=[0, 0, 1, 0.97])
161
 
162
  st.pyplot(fig)
163
 
 
188
  axes[j].axis("off")
189
 
190
  plt.tight_layout(rect=[0, 0, 1, 1])
 
191
  st.pyplot(fig)