@@ -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.%(rc)ssize `
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.%(rc)sweight `
321
321
The font weight of the text. See `.Text.set_weight` for possible
322
322
values.
323
323
@@ -331,8 +331,8 @@ def _suplabels(self, t, info, **kwargs):
331
331
fontproperties : None or dict, optional
332
332
A dict of font properties. If *fontproperties* is given the
333
333
default values for font size and weight are taken from the
334
- `.FontProperties` defaults. :rc:`figure.titlesize ` and
335
- :rc:`figure.titleweight ` are ignored in this case.
334
+ `.FontProperties` defaults. :rc:`figure.%(rc)ssize ` and
335
+ :rc:`figure.%(rc)sweight ` are ignored in this case.
336
336
337
337
**kwargs
338
338
Additional kwargs are `matplotlib.text.Text` properties.
@@ -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,34 @@ 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' , rc = 'title' )
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' , rc = 'label' )
391
392
@docstring .copy (_suplabels )
392
393
def supxlabel (self , t , ** kwargs ):
393
394
# docstring from _suplabels...
394
395
info = {'name' : '_supxlabel' , 'x0' : 0.5 , 'y0' : 0.01 ,
395
- 'ha' : 'center' , 'va' : 'bottom' , 'rotation' : 0 }
396
+ 'ha' : 'center' , 'va' : 'bottom' , 'rotation' : 0 ,
397
+ 'size' : 'figure.labelsize' , 'weight' : 'figure.labelweight' }
396
398
return self ._suplabels (t , info , ** kwargs )
397
399
398
400
@docstring .Substitution (x0 = 0.02 , y0 = 0.5 , name = 'supylabel' , ha = 'left' ,
399
- va = 'center' )
401
+ va = 'center' , rc = 'label' )
400
402
@docstring .copy (_suplabels )
401
403
def supylabel (self , t , ** kwargs ):
402
404
# docstring from _suplabels...
403
405
info = {'name' : '_supylabel' , 'x0' : 0.02 , 'y0' : 0.5 ,
404
406
'ha' : 'left' , 'va' : 'center' , 'rotation' : 'vertical' ,
405
- 'rotation_mode' : 'anchor' }
407
+ 'rotation_mode' : 'anchor' , 'size' : 'figure.labelsize' ,
408
+ 'weight' : 'figure.labelweight' }
406
409
return self ._suplabels (t , info , ** kwargs )
407
410
408
411
def get_edgecolor (self ):
0 commit comments