improve correlation legend
Browse files
folding_studio_demo/correlate.py
CHANGED
@@ -76,7 +76,7 @@ def select_correlation_plot(spr_data_with_scores: pd.DataFrame, score: str) -> g
|
|
76 |
scatter = go.Scatter(
|
77 |
x=spr_data_with_scores["KD (nM)"],
|
78 |
y=spr_data_with_scores[score],
|
79 |
-
name=f"
|
80 |
mode='markers', # Only show markers/dots, no lines
|
81 |
hovertemplate="<i>Score:</i> %{y}<br><i>KD:</i> %{x:.2f}<br>",
|
82 |
marker=dict(color='#1f77b4') # Set color to match default first color
|
@@ -104,7 +104,7 @@ def select_correlation_plot(spr_data_with_scores: pd.DataFrame, score: str) -> g
|
|
104 |
x=corr_line_x,
|
105 |
y=corr_line_y,
|
106 |
mode='lines',
|
107 |
-
name=f"
|
108 |
line=dict(color='#1f77b4') # Set same color as scatter points
|
109 |
))
|
110 |
return corr_plot
|
|
|
76 |
scatter = go.Scatter(
|
77 |
x=spr_data_with_scores["KD (nM)"],
|
78 |
y=spr_data_with_scores[score],
|
79 |
+
name=f"Samples",
|
80 |
mode='markers', # Only show markers/dots, no lines
|
81 |
hovertemplate="<i>Score:</i> %{y}<br><i>KD:</i> %{x:.2f}<br>",
|
82 |
marker=dict(color='#1f77b4') # Set color to match default first color
|
|
|
104 |
x=corr_line_x,
|
105 |
y=corr_line_y,
|
106 |
mode='lines',
|
107 |
+
name=f"Regression line",
|
108 |
line=dict(color='#1f77b4') # Set same color as scatter points
|
109 |
))
|
110 |
return corr_plot
|