@@ -152,8 +152,8 @@ def annotate_axes(ax, text, fontsize=18):
152152fig , axd = plt .subplot_mosaic ([['upper left' , 'upper right' ],
153153 ['lower left' , 'lower right' ]],
154154 figsize = (5.5 , 3.5 ), layout = "constrained" )
155- for k in axd :
156- annotate_axes (axd [ k ] , f'axd[" { k } " ]' , fontsize = 14 )
155+ for k , ax in axd . items () :
156+ annotate_axes (ax , f'axd[{ k !r } ]' , fontsize = 14 )
157157fig .suptitle ('plt.subplot_mosaic()' )
158158
159159# %%
@@ -200,8 +200,8 @@ def annotate_axes(ax, text, fontsize=18):
200200fig , axd = plt .subplot_mosaic ([['upper left' , 'right' ],
201201 ['lower left' , 'right' ]],
202202 figsize = (5.5 , 3.5 ), layout = "constrained" )
203- for k in axd :
204- annotate_axes (axd [ k ] , f'axd[" { k } " ]' , fontsize = 14 )
203+ for k , ax in axd . items () :
204+ annotate_axes (ax , f'axd[{ k !r } ]' , fontsize = 14 )
205205fig .suptitle ('plt.subplot_mosaic()' )
206206
207207# %%
@@ -223,8 +223,8 @@ def annotate_axes(ax, text, fontsize=18):
223223 ['lower left' , 'right' ]],
224224 gridspec_kw = gs_kw , figsize = (5.5 , 3.5 ),
225225 layout = "constrained" )
226- for k in axd :
227- annotate_axes (axd [ k ] , f'axd[" { k } " ]' , fontsize = 14 )
226+ for k , ax in axd . items () :
227+ annotate_axes (ax , f'axd[{ k !r } ]' , fontsize = 14 )
228228fig .suptitle ('plt.subplot_mosaic()' )
229229
230230# %%
@@ -262,8 +262,8 @@ def annotate_axes(ax, text, fontsize=18):
262262 ['lower left' , 'lower right' ]]
263263
264264fig , axd = plt .subplot_mosaic (outer , layout = "constrained" )
265- for k in axd :
266- annotate_axes (axd [ k ] , f'axd[" { k } " ]' )
265+ for k , ax in axd . items () :
266+ annotate_axes (ax , f'axd[{ k !r } ]' )
267267
268268# %%
269269# Low-level and advanced grid methods
0 commit comments