Spaces:
Running
Running
Heatmap: If the size of the heatmap is not specified, it will be calculated
Browse files- analyze_winscore.py +4 -2
- server.py +0 -2
analyze_winscore.py
CHANGED
|
@@ -228,8 +228,10 @@ def create_heatmap(data_matrix, original_scores,
|
|
| 228 |
#cell_height_border = 4 + cell_padding
|
| 229 |
cell_height_border = cell_padding
|
| 230 |
cell_size = 22
|
| 231 |
-
|
| 232 |
-
|
|
|
|
|
|
|
| 233 |
|
| 234 |
if selected_rows is not None:
|
| 235 |
# Select only the specified rows (models)
|
|
|
|
| 228 |
#cell_height_border = 4 + cell_padding
|
| 229 |
cell_height_border = cell_padding
|
| 230 |
cell_size = 22
|
| 231 |
+
if plot_width == None:
|
| 232 |
+
plot_width = n_rows * cell_size + (n_rows * cell_width_border + y_axis_size if y_axis_visible else 0)
|
| 233 |
+
if plot_height == None:
|
| 234 |
+
plot_height = n_cols * cell_size + (n_cols * cell_height_border + x_axis_size if x_axis_visible else 0)
|
| 235 |
|
| 236 |
if selected_rows is not None:
|
| 237 |
# Select only the specified rows (models)
|
server.py
CHANGED
|
@@ -843,8 +843,6 @@ class LeaderboardServer:
|
|
| 843 |
fig = create_heatmap(
|
| 844 |
original_scores,
|
| 845 |
original_scores*100,
|
| 846 |
-
plot_width=1200,
|
| 847 |
-
plot_height=1200,
|
| 848 |
y_axis_label=fig_y_axis_label,
|
| 849 |
)
|
| 850 |
|
|
|
|
| 843 |
fig = create_heatmap(
|
| 844 |
original_scores,
|
| 845 |
original_scores*100,
|
|
|
|
|
|
|
| 846 |
y_axis_label=fig_y_axis_label,
|
| 847 |
)
|
| 848 |
|