Move robustness legend beside plot
Browse files
app.py
CHANGED
|
@@ -1068,7 +1068,20 @@ def robustness_figure(dataset: str, models: list[str] | None, hover_data: dict |
|
|
| 1068 |
fig.update_xaxes(title="Noise fraction")
|
| 1069 |
metric = metric_text(df["metric"].dropna().iloc[0]) if df["metric"].notna().any() else "score"
|
| 1070 |
fig.update_yaxes(title=decoding_label(metric))
|
| 1071 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1072 |
|
| 1073 |
|
| 1074 |
def robustness_table_frame(dataset: str, models: list[str] | None) -> pd.DataFrame:
|
|
|
|
| 1068 |
fig.update_xaxes(title="Noise fraction")
|
| 1069 |
metric = metric_text(df["metric"].dropna().iloc[0]) if df["metric"].notna().any() else "score"
|
| 1070 |
fig.update_yaxes(title=decoding_label(metric))
|
| 1071 |
+
fig_layout(fig, height=560)
|
| 1072 |
+
fig.update_layout(
|
| 1073 |
+
margin=dict(l=58, r=170, t=64, b=48),
|
| 1074 |
+
legend=dict(
|
| 1075 |
+
orientation="v",
|
| 1076 |
+
yanchor="top",
|
| 1077 |
+
y=1,
|
| 1078 |
+
xanchor="left",
|
| 1079 |
+
x=1.02,
|
| 1080 |
+
font=dict(size=11),
|
| 1081 |
+
title=None,
|
| 1082 |
+
),
|
| 1083 |
+
)
|
| 1084 |
+
return fig
|
| 1085 |
|
| 1086 |
|
| 1087 |
def robustness_table_frame(dataset: str, models: list[str] | None) -> pd.DataFrame:
|