Spaces:
Running
Running
Bokeh figure - minor changes in code appearance
Browse files- analyze_winscore.py +25 -12
analyze_winscore.py
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
# -*- coding: utf-8 -*-
|
2 |
|
|
|
|
|
|
|
3 |
import csv
|
4 |
import random
|
5 |
import numpy as np
|
@@ -151,11 +154,27 @@ def create_scatter_plot_with_curve_with_variances_named(category, variance_acros
|
|
151 |
p.line(x_fit, y_fit, line_color='gray', line_width=2, line_dash='dashed')
|
152 |
|
153 |
# Add labels (with slight offset to avoid overlap)
|
154 |
-
p.add_layout(LabelSet(
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
|
161 |
# Set axis labels
|
@@ -164,18 +183,12 @@ def create_scatter_plot_with_curve_with_variances_named(category, variance_acros
|
|
164 |
|
165 |
# Set axis label font sizes
|
166 |
p.xaxis.axis_label_text_font_size = f"{FONTSIZE}pt" # Set font size for x-axis label
|
167 |
-
p.yaxis.axis_label_text_font_size = f"{FONTSIZE}pt"
|
168 |
-
|
169 |
|
170 |
# Increase tick label font sizes
|
171 |
p.xaxis.major_label_text_font_size = f"{FONTSIZE}pt" # Increase x-axis tick label size
|
172 |
p.yaxis.major_label_text_font_size = f"{FONTSIZE}pt" # Increase y-axis tick label size
|
173 |
|
174 |
-
#p.x_range.start = 1
|
175 |
-
#p.x_range.end = 18
|
176 |
-
|
177 |
-
#p.y_range.end = 60
|
178 |
-
|
179 |
p.x_scale = LogScale()
|
180 |
|
181 |
p.xaxis.ticker = tickers.LogTicker()
|
|
|
1 |
# -*- coding: utf-8 -*-
|
2 |
|
3 |
+
# author: Martin Fajčík
|
4 |
+
# modified by: Jan Doležal
|
5 |
+
|
6 |
import csv
|
7 |
import random
|
8 |
import numpy as np
|
|
|
154 |
p.line(x_fit, y_fit, line_color='gray', line_width=2, line_dash='dashed')
|
155 |
|
156 |
# Add labels (with slight offset to avoid overlap)
|
157 |
+
p.add_layout(LabelSet(
|
158 |
+
x='x',
|
159 |
+
y='y',
|
160 |
+
text='model_names',
|
161 |
+
source=source_filtered,
|
162 |
+
x_offset=5,
|
163 |
+
y_offset=8,
|
164 |
+
text_font_size=f"{FONTSIZE-2}pt",
|
165 |
+
text_color='black',
|
166 |
+
))
|
167 |
+
|
168 |
+
p.add_layout(LabelSet(
|
169 |
+
x='x',
|
170 |
+
y='y',
|
171 |
+
text='model_names',
|
172 |
+
source=source_outliers,
|
173 |
+
x_offset=5,
|
174 |
+
y_offset=8,
|
175 |
+
text_font_size=f"{FONTSIZE-2}pt",
|
176 |
+
text_color='black',
|
177 |
+
))
|
178 |
|
179 |
|
180 |
# Set axis labels
|
|
|
183 |
|
184 |
# Set axis label font sizes
|
185 |
p.xaxis.axis_label_text_font_size = f"{FONTSIZE}pt" # Set font size for x-axis label
|
186 |
+
p.yaxis.axis_label_text_font_size = f"{FONTSIZE}pt" # Set font size for y-axis label
|
|
|
187 |
|
188 |
# Increase tick label font sizes
|
189 |
p.xaxis.major_label_text_font_size = f"{FONTSIZE}pt" # Increase x-axis tick label size
|
190 |
p.yaxis.major_label_text_font_size = f"{FONTSIZE}pt" # Increase y-axis tick label size
|
191 |
|
|
|
|
|
|
|
|
|
|
|
192 |
p.x_scale = LogScale()
|
193 |
|
194 |
p.xaxis.ticker = tickers.LogTicker()
|