Spaces:
Running
Running
openhands
openhands
commited on
Commit
·
af81bcf
1
Parent(s):
fcb3d0b
Fix graph alignment issues
Browse files- Reverted log scale on x-axis (caused misalignment with layout images)
- Restored linear scale for cost axis
- Fixed logo sizing for linear scale
Co-authored-by: openhands <openhands@all-hands.dev>
leaderboard_transformer.py
CHANGED
|
@@ -581,11 +581,10 @@ def _plot_scatter_plotly(
|
|
| 581 |
encoded_logo = base64.b64encode(f.read()).decode('utf-8')
|
| 582 |
logo_uri = f"data:image/svg+xml;base64,{encoded_logo}"
|
| 583 |
|
| 584 |
-
# Calculate logo size
|
| 585 |
logo_size_x = max_reported_cost * 0.04 if max_reported_cost > 0 else 0.3
|
| 586 |
-
logo_size_y = 2.5 # Fixed y size in data units
|
| 587 |
|
| 588 |
-
# Add image at data point position, centered on the point
|
| 589 |
layout_images.append(dict(
|
| 590 |
source=logo_uri,
|
| 591 |
xref="x",
|
|
@@ -662,7 +661,6 @@ def _plot_scatter_plotly(
|
|
| 662 |
# --- Section 8: Configure Layout ---
|
| 663 |
xaxis_config = dict(
|
| 664 |
title=x_axis_label,
|
| 665 |
-
type="log", # Use logarithmic scale for cost
|
| 666 |
rangemode="tozero"
|
| 667 |
)
|
| 668 |
|
|
|
|
| 581 |
encoded_logo = base64.b64encode(f.read()).decode('utf-8')
|
| 582 |
logo_uri = f"data:image/svg+xml;base64,{encoded_logo}"
|
| 583 |
|
| 584 |
+
# Calculate logo size based on data range (linear scale)
|
| 585 |
logo_size_x = max_reported_cost * 0.04 if max_reported_cost > 0 else 0.3
|
| 586 |
+
logo_size_y = 2.5 # Fixed y size in data units
|
| 587 |
|
|
|
|
| 588 |
layout_images.append(dict(
|
| 589 |
source=logo_uri,
|
| 590 |
xref="x",
|
|
|
|
| 661 |
# --- Section 8: Configure Layout ---
|
| 662 |
xaxis_config = dict(
|
| 663 |
title=x_axis_label,
|
|
|
|
| 664 |
rangemode="tozero"
|
| 665 |
)
|
| 666 |
|