Spaces:
Running
Running
Update src/vis_utils.py
Browse files- src/vis_utils.py +5 -5
src/vis_utils.py
CHANGED
|
@@ -241,10 +241,10 @@ def plot_affinity_results(method_names, metric, affinity_path="/tmp/affinity_res
|
|
| 241 |
sns.set_theme(style="whitegrid", color_codes=True)
|
| 242 |
|
| 243 |
# Create the boxplot
|
| 244 |
-
ax = sns.boxplot(data=
|
| 245 |
|
| 246 |
# Add a swarmplot on top of the boxplot
|
| 247 |
-
sns.swarmplot(data=
|
| 248 |
|
| 249 |
# Set labels and x-axis formatting
|
| 250 |
ax.set_xlabel("Percent Pearson Correlation")
|
|
@@ -255,9 +255,9 @@ def plot_affinity_results(method_names, metric, affinity_path="/tmp/affinity_res
|
|
| 255 |
ax.grid(visible=True, which='minor', color='whitesmoke', linewidth=0.5)
|
| 256 |
|
| 257 |
# Add reference lines
|
| 258 |
-
ax.plot((best_pipr, best_pipr), (-1, len(
|
| 259 |
-
ax.plot((baseline_ac, baseline_ac), (-1, len(
|
| 260 |
-
ax.plot((baseline_ctd, baseline_ctd), (-1, len(
|
| 261 |
|
| 262 |
# Apply custom color settings to y-axis labels
|
| 263 |
for label in ax.get_yticklabels():
|
|
|
|
| 241 |
sns.set_theme(style="whitegrid", color_codes=True)
|
| 242 |
|
| 243 |
# Create the boxplot
|
| 244 |
+
ax = sns.boxplot(data=df, whis=np.inf, orient="h")
|
| 245 |
|
| 246 |
# Add a swarmplot on top of the boxplot
|
| 247 |
+
sns.swarmplot(data=df, orient="h", color=".1", ax=ax)
|
| 248 |
|
| 249 |
# Set labels and x-axis formatting
|
| 250 |
ax.set_xlabel("Percent Pearson Correlation")
|
|
|
|
| 255 |
ax.grid(visible=True, which='minor', color='whitesmoke', linewidth=0.5)
|
| 256 |
|
| 257 |
# Add reference lines
|
| 258 |
+
ax.plot((best_pipr, best_pipr), (-1, len(df.columns) + 1), color='black', label='Best PIPR')
|
| 259 |
+
ax.plot((baseline_ac, baseline_ac), (-1, len(df.columns) + 1), color='purple', linestyle='dashed', label='Baseline AC')
|
| 260 |
+
ax.plot((baseline_ctd, baseline_ctd), (-1, len(df.columns) + 1), color='brown', linestyle='dashed', label='Baseline CTD')
|
| 261 |
|
| 262 |
# Apply custom color settings to y-axis labels
|
| 263 |
for label in ax.get_yticklabels():
|