@@ -66,13 +66,13 @@ def identify_axes(ax_dict, fontsize=48):
6666fig = plt .figure (constrained_layout = True )
6767ax_array = fig .subplots (2 , 2 , squeeze = False )
6868
69- ax_array [0 , 0 ].bar (['a' , 'b' , 'c' ], [5 , 7 , 9 ])
69+ ax_array [0 , 0 ].bar (["a" , "b" , "c" ], [5 , 7 , 9 ])
7070ax_array [0 , 1 ].plot ([1 , 2 , 3 ])
71- ax_array [1 , 0 ].hist (hist_data , bins = ' auto' )
71+ ax_array [1 , 0 ].hist (hist_data , bins = " auto" )
7272ax_array [1 , 1 ].imshow ([[1 , 2 ], [2 , 1 ]])
7373
7474identify_axes (
75- {(j , k ): a for j , r in enumerate (ax_array ) for k , a in enumerate (r )}
75+ {(j , k ): a for j , r in enumerate (ax_array ) for k , a in enumerate (r )},
7676)
7777
7878###############################################################################
@@ -81,12 +81,15 @@ def identify_axes(ax_dict, fontsize=48):
8181
8282fig = plt .figure (constrained_layout = True )
8383ax_dict = fig .subplot_mosaic (
84- [['bar' , 'plot' ],
85- ['hist' , 'image' ]])
86- ax_dict ['bar' ].bar (['a' , 'b' , 'c' ], [5 , 7 , 9 ])
87- ax_dict ['plot' ].plot ([1 , 2 , 3 ])
88- ax_dict ['hist' ].hist (hist_data )
89- ax_dict ['image' ].imshow ([[1 , 2 ], [2 , 1 ]])
84+ [
85+ ["bar" , "plot" ],
86+ ["hist" , "image" ],
87+ ],
88+ )
89+ ax_dict ["bar" ].bar (["a" , "b" , "c" ], [5 , 7 , 9 ])
90+ ax_dict ["plot" ].plot ([1 , 2 , 3 ])
91+ ax_dict ["hist" ].hist (hist_data )
92+ ax_dict ["image" ].imshow ([[1 , 2 ], [2 , 1 ]])
9093identify_axes (ax_dict )
9194
9295###############################################################################
@@ -277,11 +280,12 @@ def identify_axes(ax_dict, fontsize=48):
277280# list), for example using spans, blanks, and *gridspec_kw*:
278281
279282axd = plt .figure (constrained_layout = True ).subplot_mosaic (
280- [["main" , "zoom" ],
281- ["main" , "BLANK" ]
282- ],
283+ [
284+ ["main" , "zoom" ],
285+ ["main" , "BLANK" ],
286+ ],
283287 empty_sentinel = "BLANK" ,
284- gridspec_kw = {"width_ratios" : [2 , 1 ]}
288+ gridspec_kw = {"width_ratios" : [2 , 1 ]},
285289)
286290identify_axes (axd )
287291
@@ -311,6 +315,7 @@ def identify_axes(ax_dict, fontsize=48):
311315for j in range (4 ):
312316 mosaic [j , j ] = j + 1
313317axd = plt .figure (constrained_layout = True ).subplot_mosaic (
314- mosaic , empty_sentinel = 0
318+ mosaic ,
319+ empty_sentinel = 0 ,
315320)
316321identify_axes (axd )
0 commit comments