@@ -22,10 +22,11 @@ def plot(plot_type, data, fig_type, target_dir):
2222 yaxis_title = data ["y" ],
2323 font = dict (family = "Courier New, monospace" , size = 18 ),
2424 )
25- file_stem = slugify (f"scatter_{ data ['x-title' ]} _{ data ['y-title' ]} " ,
26- regex_pattern = r"[^A-z0-9-_]+" ,
27- lowercase = False ,
28- )
25+ file_stem = slugify (
26+ f"scatter_{ data ['x-title' ]} _{ data ['y-title' ]} " ,
27+ regex_pattern = r"[^A-z0-9-_]+" ,
28+ lowercase = False ,
29+ )
2930 elif plot_type == "bar" :
3031 total = [x + y for x , y in zip (x , y )]
3132 x_pct = [x / ttl for x , ttl in zip (x , total )]
@@ -46,10 +47,11 @@ def plot(plot_type, data, fig_type, target_dir):
4647 barmode = "group" ,
4748 font = dict (family = "Courier New, monospace" , size = 14 ),
4849 )
49- file_stem = slugify (f"bar_{ data ['x' ]} _{ data ['y' ]} _{ data ['count_item_type' ]} _{ data ['contest' ]} " ,
50- regex_pattern = r"[^A-z0-9-_]+" ,
51- lowercase = False ,
52- )
50+ file_stem = slugify (
51+ f"bar_{ data ['x' ]} _{ data ['y' ]} _{ data ['count_item_type' ]} _{ data ['contest' ]} " ,
52+ regex_pattern = r"[^A-z0-9-_]+" ,
53+ lowercase = False ,
54+ )
5355 image_dir = os .path .join (target_dir , "images" )
5456 file_name = f"{ file_stem } .{ fig_type } "
5557 file_path = os .path .join (image_dir , file_name )
0 commit comments