mgyigit commited on
Commit
56c6360
·
verified ·
1 Parent(s): 04421b9

Update src/vis_utils.py

Browse files
Files changed (1) hide show
  1. 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=df_corr, whis=np.inf, orient="h")
245
 
246
  # Add a swarmplot on top of the boxplot
247
- sns.swarmplot(data=df_corr, orient="h", color=".1", ax=ax)
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(df_corr.columns) + 1), color='black', label='Best PIPR')
259
- ax.plot((baseline_ac, baseline_ac), (-1, len(df_corr.columns) + 1), color='purple', linestyle='dashed', label='Baseline AC')
260
- ax.plot((baseline_ctd, baseline_ctd), (-1, len(df_corr.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():
 
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():