Spaces:
Sleeping
Sleeping
Heatmap: Simplification of constants for calculating the external height and width of the graph
Browse files- analyze_winscore.py +4 -10
analyze_winscore.py
CHANGED
@@ -222,19 +222,13 @@ def create_heatmap(data_matrix, original_scores,
|
|
222 |
FONTSIZE = 9
|
223 |
|
224 |
n_rows, n_cols = data_matrix.shape
|
225 |
-
y_axis_size =
|
226 |
-
x_axis_size =
|
227 |
-
cell_padding = 3
|
228 |
-
cell_width_border = 1 + cell_padding
|
229 |
-
#cell_height_border = 4 + cell_padding
|
230 |
-
cell_height_border = cell_padding
|
231 |
cell_size = 22
|
232 |
if plot_width == None:
|
233 |
-
plot_width = n_rows * cell_size + (
|
234 |
-
plot_width = n_rows * cell_size + (253 if y_axis_visible else 0)
|
235 |
if plot_height == None:
|
236 |
-
plot_height = n_cols * cell_size + (
|
237 |
-
plot_height = n_cols * cell_size + (242 + 36 if x_axis_visible else 0)
|
238 |
|
239 |
if selected_rows is not None:
|
240 |
# Select only the specified rows (models)
|
|
|
222 |
FONTSIZE = 9
|
223 |
|
224 |
n_rows, n_cols = data_matrix.shape
|
225 |
+
y_axis_size = 253
|
226 |
+
x_axis_size = 278
|
|
|
|
|
|
|
|
|
227 |
cell_size = 22
|
228 |
if plot_width == None:
|
229 |
+
plot_width = n_rows * cell_size + (y_axis_size if y_axis_visible else 0)
|
|
|
230 |
if plot_height == None:
|
231 |
+
plot_height = n_cols * cell_size + (x_axis_size if x_axis_visible else 0)
|
|
|
232 |
|
233 |
if selected_rows is not None:
|
234 |
# Select only the specified rows (models)
|