1717from bidsmreye .utils import check_if_file_found , set_this_filter
1818
1919LINE_WIDTH = 3
20- FONT_SIZE = dict ( size = 14 )
20+ FONT_SIZE = { " size" : 14 }
2121GRID_COLOR = "grey"
2222LINE_COLOR = "rgb(0, 150, 175)"
2323BG_COLOR = "rgb(255,255,255)"
2424HEAT_MAP_COLOR = "gnbu"
2525MARKER_SIZE = 10
2626
27- TICK_FONT = dict ( family = " arial" , color = " black" , size = 14 )
27+ TICK_FONT = { " family" : " arial" , " color" : " black" , " size" : 14 }
2828
2929X_POSITION_1 = 1
3030X_POSITION_2 = 1.5
@@ -113,7 +113,7 @@ def plot_group_boxplot(
113113 go .Box (
114114 x = np .ones (nb_data_points ) * X_POSITION [i ],
115115 y = qc_data [this_column ],
116- marker = dict ( size = MARKER_SIZE , color = COLORS [i ]) ,
116+ marker = { " size" : MARKER_SIZE , " color" : COLORS [i ]} ,
117117 name = trace_names [i ],
118118 ),
119119 row = row ,
@@ -128,7 +128,7 @@ def plot_group_boxplot(
128128 fig .update_yaxes (
129129 row = row ,
130130 col = col ,
131- title = dict ( text = yaxes_title , font = FONT_SIZE ) ,
131+ title = { " text" : yaxes_title , " font" : FONT_SIZE } ,
132132 )
133133
134134
@@ -186,7 +186,7 @@ def group_report(cfg: Config) -> None:
186186 )
187187
188188 fig .update_yaxes (
189- title = dict ( standoff = 0 , font = FONT_SIZE ) ,
189+ title = { " standoff" : 0 , " font" : FONT_SIZE } ,
190190 showline = True ,
191191 linewidth = LINE_WIDTH - 1 ,
192192 linecolor = "black" ,
@@ -215,9 +215,9 @@ def group_report(cfg: Config) -> None:
215215 boxmean = True ,
216216 width = 0.2 ,
217217 hovertext = qc_data ["filename" ],
218- marker = dict ( size = MARKER_SIZE ) ,
218+ marker = { " size" : MARKER_SIZE } ,
219219 fillcolor = "rgb(200, 200, 200)" ,
220- line = dict ( color = " black") ,
220+ line = { " color" : " black"} ,
221221 )
222222
223223 fig .update_layout (
@@ -226,17 +226,17 @@ def group_report(cfg: Config) -> None:
226226 paper_bgcolor = BG_COLOR ,
227227 height = 800 ,
228228 width = 800 ,
229- title = dict (
230- text = f"""<b>bidsmreye: group report</b><br>
229+ title = {
230+ " text" : f"""<b>bidsmreye: group report</b><br>
231231 <b>Summary</b><br>
232232 - Date and time: { datetime .now ():%Y-%m-%d, %H:%M} <br>
233233 - bidsmreye version: { __version__ } <br>
234234 """ ,
235- x = 0.05 ,
236- y = 0.95 ,
237- font = dict ( size = 19 , color = " black") ,
238- ) ,
239- margin = dict ( t = 150 , b = 10 , l = 100 , r = 10 , pad = 0 ) ,
235+ "x" : 0.05 ,
236+ "y" : 0.95 ,
237+ " font" : { " size" : 19 , " color" : " black"} ,
238+ } ,
239+ margin = { "t" : 150 , "b" : 10 , "l" : 100 , "r" : 10 , " pad" : 0 } ,
240240 )
241241
242242 fig .show ()
@@ -288,7 +288,7 @@ def visualize_eye_gaze_data(
288288 fig .update_xaxes (
289289 row = 3 ,
290290 col = 1 ,
291- title = dict ( text = " Time (s)" , standoff = 16 , font = FONT_SIZE ) ,
291+ title = { " text" : " Time (s)" , " standoff" : 16 , " font" : FONT_SIZE } ,
292292 tickfont = TICK_FONT ,
293293 )
294294
@@ -376,7 +376,7 @@ def plot_time_series(
376376 griddash = "dot" ,
377377 gridwidth = 0.5 ,
378378 ticksuffix = "°" ,
379- title = dict ( text = title_text , standoff = 0 , font = FONT_SIZE ) ,
379+ title = { " text" : title_text , " standoff" : 0 , " font" : FONT_SIZE } ,
380380 tickfont = FONT_SIZE ,
381381 )
382382
@@ -428,7 +428,7 @@ def plot_heat_map(fig: Any, eye_gaze_data: pd.DataFrame) -> None:
428428 x = X ,
429429 y = Y ,
430430 opacity = 0.4 ,
431- line = dict ( color = " black" , width = 1 , dash = " dash") ,
431+ line = { " color" : " black" , " width" : 1 , " dash" : " dash"} ,
432432 ),
433433 row = 1 ,
434434 col = 3 ,
@@ -448,15 +448,15 @@ def plot_heat_map(fig: Any, eye_gaze_data: pd.DataFrame) -> None:
448448 col = 3 ,
449449 range = value_range (X ),
450450 ticksuffix = "°" ,
451- title = dict ( text = " X" , standoff = 16 , font = FONT_SIZE ) ,
451+ title = { " text" : " X" , " standoff" : 16 , " font" : FONT_SIZE } ,
452452 tickfont = TICK_FONT ,
453453 )
454454 fig .update_yaxes (
455455 row = 1 ,
456456 col = 3 ,
457457 range = value_range (Y ),
458458 ticksuffix = "°" ,
459- title = dict ( text = " Y" , standoff = 16 , font = FONT_SIZE ) ,
459+ title = { " text" : " Y" , " standoff" : 16 , " font" : FONT_SIZE } ,
460460 tickfont = TICK_FONT ,
461461 )
462462
0 commit comments