@@ -221,20 +221,31 @@ def stats(
221
221
for value , count in stats ["flag_count_per_value" ].items ():
222
222
number_of_points .append (value * count )
223
223
224
- ax1 .bar (list (stats ["flag_count_per_value" ].keys ()), list (stats ["flag_count_per_value" ].values ()), - width ,
225
- label = "Number of points" , color = "blue" , align = "edge" )
224
+ ax1 .bar (
225
+ list (stats ["flag_count_per_value" ].keys ()),
226
+ list (stats ["flag_count_per_value" ].values ()),
227
+ - width ,
228
+ label = "Number of flags" ,
229
+ color = "blue" ,
230
+ align = "edge" ,
231
+ )
226
232
ax1 .set_xlabel ("Flag Value (points)" )
227
233
ax1 .set_ylabel ("Number of Flags" , color = "blue" )
228
- ax1 .tick_params (axis = 'y' , labelcolor = "blue" )
234
+ ax1 .tick_params (axis = "y" , labelcolor = "blue" )
229
235
230
236
ax2 = ax1 .twinx ()
231
237
232
- ax2 .bar (list (stats ["flag_count_per_value" ].keys ()), number_of_points , width , label = "Number of flags" ,
233
- color = "orange" ,
234
- align = "edge" )
238
+ ax2 .bar (
239
+ list (stats ["flag_count_per_value" ].keys ()),
240
+ number_of_points ,
241
+ width ,
242
+ label = "Number of points" ,
243
+ color = "orange" ,
244
+ align = "edge" ,
245
+ )
235
246
ax2 .set_xlabel ("Flag Value" )
236
247
ax2 .set_ylabel ("Number of points" , color = "orange" )
237
- ax2 .tick_params (axis = 'y' , labelcolor = "orange" )
248
+ ax2 .tick_params (axis = "y" , labelcolor = "orange" )
238
249
239
250
plt .xticks (
240
251
ticks = range (0 , max (stats ["flag_count_per_value" ].keys ()) + 1 ), rotation = 45
@@ -243,7 +254,7 @@ def stats(
243
254
plt .grid (True , linestyle = "--" , alpha = 0.3 )
244
255
plt .xlabel ("Flag Value" )
245
256
plt .title ("Number of Flags per Value" )
246
- fig .legend (loc = ' upper right' )
257
+ fig .legend (loc = " upper right" )
247
258
248
259
plt .savefig (os .path .join (".charts" , "flags_per_value.png" ))
249
260
plt .clf ()
0 commit comments