mgyigit commited on
Commit
c55a2a1
·
verified ·
1 Parent(s): c1186e5

Update src/vis_utils.py

Browse files
Files changed (1) hide show
  1. src/vis_utils.py +3 -3
src/vis_utils.py CHANGED
@@ -78,10 +78,10 @@ def plot_similarity_results(methods_selected, x_metric, y_metric, similarity_pat
78
  similarity_df = pd.read_csv(similarity_path)
79
 
80
  # Filter the dataframe based on selected methods
81
- filtered_df = similarity_df[similarity_df['method_name'].isin(methods_selected)]
82
 
83
  # Add a new column to the dataframe for the color
84
- filtered_df['color'] = filtered_df['method_name'].apply(get_method_color)
85
 
86
  title, x_label, y_label = generate_labels_and_title(x_metric, y_metric)
87
 
@@ -97,7 +97,7 @@ def plot_similarity_results(methods_selected, x_metric, y_metric, similarity_pat
97
  mapping=p9.aes(x=x_metric, # Use the selected x_metric
98
  y=y_metric, # Use the selected y_metric
99
  color='color', # Use the dynamically generated color
100
- label='method_name')) # Label each point by the method name
101
  + p9.geom_point(size=3) # Add points with no jitter, set point size
102
  + p9.geom_text(nudge_y=0.02, size=8) # Add method names as labels, nudge slightly above the points
103
  + p9.labs(title=title, x=x_label, y=y_label) # Dynamic labels for X and Y axes
 
78
  similarity_df = pd.read_csv(similarity_path)
79
 
80
  # Filter the dataframe based on selected methods
81
+ filtered_df = similarity_df[similarity_df['Method'].isin(methods_selected)]
82
 
83
  # Add a new column to the dataframe for the color
84
+ filtered_df['color'] = filtered_df['Method'].apply(get_method_color)
85
 
86
  title, x_label, y_label = generate_labels_and_title(x_metric, y_metric)
87
 
 
97
  mapping=p9.aes(x=x_metric, # Use the selected x_metric
98
  y=y_metric, # Use the selected y_metric
99
  color='color', # Use the dynamically generated color
100
+ label='Method')) # Label each point by the method name
101
  + p9.geom_point(size=3) # Add points with no jitter, set point size
102
  + p9.geom_text(nudge_y=0.02, size=8) # Add method names as labels, nudge slightly above the points
103
  + p9.labs(title=title, x=x_label, y=y_label) # Dynamic labels for X and Y axes