Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d794b09

Browse files
committed
actually read the new rcParam
1 parent fb2e612 commit d794b09

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def set_title(self, label, fontdict=None, loc="center", **kwargs):
108108
the default `fontdict` is::
109109
110110
{'fontsize': rcParams['axes.titlesize'],
111+
'fontweight' : rcParams['axes.titleweight'],
111112
'verticalalignment': 'baseline',
112113
'horizontalalignment': loc}
113114
@@ -133,6 +134,7 @@ def set_title(self, label, fontdict=None, loc="center", **kwargs):
133134
raise ValueError("'%s' is not a valid location" % loc)
134135
default = {
135136
'fontsize': rcParams['axes.titlesize'],
137+
'fontweight' : rcParams['axes.titleweight'],
136138
'verticalalignment': 'baseline',
137139
'horizontalalignment': loc.lower()}
138140
title.set_text(label)

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,8 @@ def cla(self):
895895
self.containers = []
896896

897897
self.grid(self._gridOn, which=rcParams['axes.grid.which'])
898-
props = font_manager.FontProperties(size=rcParams['axes.titlesize'])
898+
props = font_manager.FontProperties(size=rcParams['axes.titlesize'],
899+
weight=rcParams['axes.titleweight'])
899900

900901
self.titleOffsetTrans = mtransforms.ScaledTranslation(
901902
0.0, 5.0 / 72.0, self.figure.dpi_scale_trans)

0 commit comments

Comments
 (0)