@@ -314,10 +314,10 @@ def _suplabels(self, t, info, **kwargs):
314
314
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, \
315
315
default: %(va)s
316
316
The vertical alignment of the text relative to (*x*, *y*).
317
- fontsize, size : default: :rc:`figure.titlesize `
317
+ fontsize, size : default: :rc:`figure.%(size)s `
318
318
The font size of the text. See `.Text.set_size` for possible
319
319
values.
320
- fontweight, weight : default: :rc:`figure.titleweight `
320
+ fontweight, weight : default: :rc:`figure.%(weight)s `
321
321
The font weight of the text. See `.Text.set_weight` for possible
322
322
values.
323
323
@@ -360,9 +360,9 @@ def _suplabels(self, t, info, **kwargs):
360
360
361
361
if 'fontproperties' not in kwargs :
362
362
if 'fontsize' not in kwargs and 'size' not in kwargs :
363
- kwargs ['size' ] = mpl .rcParams ['figure.titlesize' ]
363
+ kwargs ['size' ] = mpl .rcParams [info [ 'size' ] ]
364
364
if 'fontweight' not in kwargs and 'weight' not in kwargs :
365
- kwargs ['weight' ] = mpl .rcParams ['figure.titleweight' ]
365
+ kwargs ['weight' ] = mpl .rcParams [info [ 'weight' ] ]
366
366
367
367
sup = self .text (x , y , t , ** kwargs )
368
368
if suplab is not None :
@@ -378,31 +378,36 @@ def _suplabels(self, t, info, **kwargs):
378
378
return suplab
379
379
380
380
@docstring .Substitution (x0 = 0.5 , y0 = 0.98 , name = 'suptitle' , ha = 'center' ,
381
- va = 'top' )
381
+ va = 'top' , size = 'titlesize' , weight = 'titleweight' )
382
382
@docstring .copy (_suplabels )
383
383
def suptitle (self , t , ** kwargs ):
384
384
# docstring from _suplabels...
385
385
info = {'name' : '_suptitle' , 'x0' : 0.5 , 'y0' : 0.98 ,
386
- 'ha' : 'center' , 'va' : 'top' , 'rotation' : 0 }
386
+ 'ha' : 'center' , 'va' : 'top' , 'rotation' : 0 ,
387
+ 'size' : 'figure.titlesize' , 'weight' : 'figure.titleweight' }
387
388
return self ._suplabels (t , info , ** kwargs )
388
389
389
390
@docstring .Substitution (x0 = 0.5 , y0 = 0.01 , name = 'supxlabel' , ha = 'center' ,
390
- va = 'bottom' )
391
+ va = 'bottom' , size = 'labelsize' ,
392
+ weight = 'labelweight' )
391
393
@docstring .copy (_suplabels )
392
394
def supxlabel (self , t , ** kwargs ):
393
395
# docstring from _suplabels...
394
396
info = {'name' : '_supxlabel' , 'x0' : 0.5 , 'y0' : 0.01 ,
395
- 'ha' : 'center' , 'va' : 'bottom' , 'rotation' : 0 }
397
+ 'ha' : 'center' , 'va' : 'bottom' , 'rotation' : 0 ,
398
+ 'size' : 'figure.labelsize' , 'weight' : 'figure.labelweight' }
396
399
return self ._suplabels (t , info , ** kwargs )
397
400
398
401
@docstring .Substitution (x0 = 0.02 , y0 = 0.5 , name = 'supylabel' , ha = 'left' ,
399
- va = 'center' )
402
+ va = 'center' , size = 'labelsize' ,
403
+ weight = 'labelweight' )
400
404
@docstring .copy (_suplabels )
401
405
def supylabel (self , t , ** kwargs ):
402
406
# docstring from _suplabels...
403
407
info = {'name' : '_supylabel' , 'x0' : 0.02 , 'y0' : 0.5 ,
404
408
'ha' : 'left' , 'va' : 'center' , 'rotation' : 'vertical' ,
405
- 'rotation_mode' : 'anchor' }
409
+ 'rotation_mode' : 'anchor' ,
410
+ 'size' : 'figure.labelsize' , 'weight' : 'figure.labelweight' }
406
411
return self ._suplabels (t , info , ** kwargs )
407
412
408
413
def get_edgecolor (self ):
0 commit comments