@@ -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.%(rc)ssize `
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.%(rc)sweight `
321321 The font weight of the text. See `.Text.set_weight` for possible
322322 values.
323323
@@ -331,8 +331,8 @@ def _suplabels(self, t, info, **kwargs):
331331 fontproperties : None or dict, optional
332332 A dict of font properties. If *fontproperties* is given the
333333 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.
336336
337337 **kwargs
338338 Additional kwargs are `matplotlib.text.Text` properties.
@@ -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,34 @@ 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' , rc = 'title' )
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' , rc = 'label' )
391392 @_docstring .copy (_suplabels )
392393 def supxlabel (self , t , ** kwargs ):
393394 # docstring from _suplabels...
394395 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' }
396398 return self ._suplabels (t , info , ** kwargs )
397399
398400 @_docstring .Substitution (x0 = 0.02 , y0 = 0.5 , name = 'supylabel' , ha = 'left' ,
399- va = 'center' )
401+ va = 'center' , rc = 'label' )
400402 @_docstring .copy (_suplabels )
401403 def supylabel (self , t , ** kwargs ):
402404 # docstring from _suplabels...
403405 info = {'name' : '_supylabel' , 'x0' : 0.02 , 'y0' : 0.5 ,
404406 'ha' : 'left' , 'va' : 'center' , 'rotation' : 'vertical' ,
405- 'rotation_mode' : 'anchor' }
407+ 'rotation_mode' : 'anchor' , 'size' : 'figure.labelsize' ,
408+ 'weight' : 'figure.labelweight' }
406409 return self ._suplabels (t , info , ** kwargs )
407410
408411 def get_edgecolor (self ):
0 commit comments