mgyigit commited on
Commit
8964eb3
1 Parent(s): b8fb55c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ def draw_scatter_plot_similarity(methods_selected, x_metric, y_metric, title):
44
  label='method_names')) # Label each point by the method name
45
  + p9.geom_point(size=3) # Add points with no jitter, set point size
46
  + p9.geom_text(nudge_y=0.02, size=8) # Add method names as labels, nudge slightly above the points
47
- + p9.labs(title=title, x=f"{x_metric} Metric", y=f"{y_metric} Metric") # Dynamic labels for X and Y axes
48
  + p9.scale_color_identity() # Use colors directly from the dataframe
49
  + p9.theme(legend_position='none',
50
  figure_size=(10, 10), # Set figure size
@@ -67,7 +67,7 @@ def benchmark_plot(benchmark_type, methods_selected, x_metric, y_metric):
67
  # Use general visualizer logic
68
  return general_visualizer_plot(methods_selected, x_metric=x_metric, y_metric=y_metric)
69
  elif benchmark_type == 'similarity':
70
- title = f"Similarity Benchmark: {x_metric} vs {y_metric}"
71
  return draw_scatter_plot_similarity(methods_selected, x_metric, y_metric, title)
72
  elif benchmark_type == 'Benchmark 3':
73
  return benchmark_3_plot(x_metric, y_metric)
 
44
  label='method_names')) # Label each point by the method name
45
  + p9.geom_point(size=3) # Add points with no jitter, set point size
46
  + p9.geom_text(nudge_y=0.02, size=8) # Add method names as labels, nudge slightly above the points
47
+ + p9.labs(title=title, x=f"{x_metric}", y=f"{y_metric}") # Dynamic labels for X and Y axes
48
  + p9.scale_color_identity() # Use colors directly from the dataframe
49
  + p9.theme(legend_position='none',
50
  figure_size=(10, 10), # Set figure size
 
67
  # Use general visualizer logic
68
  return general_visualizer_plot(methods_selected, x_metric=x_metric, y_metric=y_metric)
69
  elif benchmark_type == 'similarity':
70
+ title = f"{x_metric} vs {y_metric}"
71
  return draw_scatter_plot_similarity(methods_selected, x_metric, y_metric, title)
72
  elif benchmark_type == 'Benchmark 3':
73
  return benchmark_3_plot(x_metric, y_metric)