@@ -314,10 +314,10 @@ def _suplabels(self, t, info, **kwargs):
314314 verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, \
315315 default: %(va)s
316316 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 `
318318 The font size of the text. See `.Text.set_size` for possible
319319 values.
320- fontweight, weight : default: :rc:`figure.titleweight `
320+ fontweight, weight : default: :rc:`figure.%(weight)s `
321321 The font weight of the text. See `.Text.set_weight` for possible
322322 values.
323323
@@ -360,9 +360,9 @@ def _suplabels(self, t, info, **kwargs):
360360
361361 if 'fontproperties' not in kwargs :
362362 if 'fontsize' not in kwargs and 'size' not in kwargs :
363- kwargs ['size' ] = mpl .rcParams ['figure.titlesize' ]
363+ kwargs ['size' ] = mpl .rcParams [info [ 'size' ] ]
364364 if 'fontweight' not in kwargs and 'weight' not in kwargs :
365- kwargs ['weight' ] = mpl .rcParams ['figure.titleweight' ]
365+ kwargs ['weight' ] = mpl .rcParams [info [ 'weight' ] ]
366366
367367 sup = self .text (x , y , t , ** kwargs )
368368 if suplab is not None :
@@ -378,31 +378,36 @@ def _suplabels(self, t, info, **kwargs):
378378 return suplab
379379
380380 @docstring .Substitution (x0 = 0.5 , y0 = 0.98 , name = 'suptitle' , ha = 'center' ,
381- va = 'top' )
381+ va = 'top' , size = 'titlesize' , weight = 'titleweight' )
382382 @docstring .copy (_suplabels )
383383 def suptitle (self , t , ** kwargs ):
384384 # docstring from _suplabels...
385385 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' }
387388 return self ._suplabels (t , info , ** kwargs )
388389
389390 @docstring .Substitution (x0 = 0.5 , y0 = 0.01 , name = 'supxlabel' , ha = 'center' ,
390- va = 'bottom' )
391+ va = 'bottom' , size = 'labelsize' ,
392+ weight = 'labelweight' )
391393 @docstring .copy (_suplabels )
392394 def supxlabel (self , t , ** kwargs ):
393395 # docstring from _suplabels...
394396 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' }
396399 return self ._suplabels (t , info , ** kwargs )
397400
398401 @docstring .Substitution (x0 = 0.02 , y0 = 0.5 , name = 'supylabel' , ha = 'left' ,
399- va = 'center' )
402+ va = 'center' , size = 'labelsize' ,
403+ weight = 'labelweight' )
400404 @docstring .copy (_suplabels )
401405 def supylabel (self , t , ** kwargs ):
402406 # docstring from _suplabels...
403407 info = {'name' : '_supylabel' , 'x0' : 0.02 , 'y0' : 0.5 ,
404408 'ha' : 'left' , 'va' : 'center' , 'rotation' : 'vertical' ,
405- 'rotation_mode' : 'anchor' }
409+ 'rotation_mode' : 'anchor' ,
410+ 'size' : 'figure.labelsize' , 'weight' : 'figure.labelweight' }
406411 return self ._suplabels (t , info , ** kwargs )
407412
408413 def get_edgecolor (self ):
0 commit comments