@@ -152,8 +152,8 @@ def annotate_axes(ax, text, fontsize=18):
152
152
fig , axd = plt .subplot_mosaic ([['upper left' , 'upper right' ],
153
153
['lower left' , 'lower right' ]],
154
154
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 )
157
157
fig .suptitle ('plt.subplot_mosaic()' )
158
158
159
159
# %%
@@ -200,8 +200,8 @@ def annotate_axes(ax, text, fontsize=18):
200
200
fig , axd = plt .subplot_mosaic ([['upper left' , 'right' ],
201
201
['lower left' , 'right' ]],
202
202
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 )
205
205
fig .suptitle ('plt.subplot_mosaic()' )
206
206
207
207
# %%
@@ -223,8 +223,8 @@ def annotate_axes(ax, text, fontsize=18):
223
223
['lower left' , 'right' ]],
224
224
gridspec_kw = gs_kw , figsize = (5.5 , 3.5 ),
225
225
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 )
228
228
fig .suptitle ('plt.subplot_mosaic()' )
229
229
230
230
# %%
@@ -262,8 +262,8 @@ def annotate_axes(ax, text, fontsize=18):
262
262
['lower left' , 'lower right' ]]
263
263
264
264
fig , 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 } ]' )
267
267
268
268
# %%
269
269
# Low-level and advanced grid methods
0 commit comments