8000 FIX: move title verticalalignment to bottom from baseline · matplotlib/matplotlib@30aa17c · GitHub
[go: up one dir, main page]

Skip to content

Commit 30aa17c

Browse files
committed
FIX: move title verticalalignment to bottom from baseline
1 parent 769844e commit 30aa17c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def set_title(self, label, fontdict=None, loc="center", pad=None,
146146
147147
{'fontsize': rcParams['axes.titlesize'],
148148
'fontweight' : rcParams['axes.titleweight'],
149-
'verticalalignment': 'baseline',
149+
'verticalalignment': 'bottom',
150150
'horizontalalignment': loc}
151151
152152
loc : {'center', 'left', 'right'}, str, optional
@@ -177,7 +177,7 @@ def set_title(self, label, fontdict=None, loc="center", pad=None,
177177
default = {
178178
'fontsize': rcParams['axes.titlesize'],
179179
'fontweight': rcParams['axes.titleweight'],
180-
'verticalalignment': 'baseline',
180+
'verticalalignment': 'bottom',
181181
'horizontalalignment': loc.lower()}
182182
if pad is None:
183183
pad = rcParams['axes.titlepad']

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 3 deletions
1066
Original file line numberDiff line numberDiff line change
@@ -1063,18 +1063,18 @@ def cla(self):
10631063
self.title = mtext.Text(
10641064
x=0.5, y=1.0, text='',
10651065
fontproperties=props,
1066-
verticalalignment='baseline',
+
verticalalignment='bottom',
10671067
horizontalalignment='center',
10681068
)
10691069
self._left_title = mtext.Text(
10701070
x=0.0, y=1.0, text='',
10711071
fontproperties=props.copy(),
1072-
verticalalignment='baseline',
1072+
verticalalignment='bottom',
10731073
horizontalalignment='left', )
10741074
self._right_title = mtext.Text(
10751075
x=1.0, y=1.0, text='',
10761076
fontproperties=props.copy(),
1077-
verticalalignment='baseline',
1077+
verticalalignment='bottom',
10781078
horizontalalignment='right',
10791079
)
10801080
title_offset_points = rcParams['axes.titlepad']

lib/matplotlib/rcsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ def _validate_linestyle(ls):
11491149
'axes.titlesize': ['large', validate_fontsize], # fontsize of the
11501150
# axes title
11511151
'axes.titleweight': ['normal', validate_string], # font weight of axes title
1152-
'axes.titlepad': [6.0, validate_float], # pad from axes top to title in points
1152+
'axes.titlepad': [3.0, validate_float], # pad from axes top to title in points
11531153
'axes.grid': [False, validate_bool], # display grid or not
11541154
'axes.grid.which': ['major', validate_axis_locator], # set whether the gid are by
11551155
# default draw on 'major'

matplotlibrc.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ backend : $TEMPLATE_BACKEND
290290
#axes.grid.which : major ## gridlines at major, minor or both ticks
291291
#axes.titlesize : large ## fontsize of the axes title
292292
#axes.titleweight : normal ## font weight of title
293-
#axes.titlepad : 6.0 ## pad between axes and title in points
293+
#axes.titlepad : 3.0 ## pad between axes and title in points
294294
#axes.labelsize : medium ## fontsize of the x any y labels
295295
#axes.labelpad : 4.0 ## space between label and axis
296296
#axes.labelweight : normal ## weight of the x and y labels
@@ -415,7 +415,7 @@ backend : $TEMPLATE_BACKEND
415415
#legend.scatterpoints : 1 ## number of scatter points
416416
#legend.markerscale : 1.0 ## the relative size of legend markers vs. original
417417
#legend.fontsize : medium
418-
#legend.title_fontsize : None ## None sets to the same as the default axes.
418+
#legend.title_fontsize : None ## None sets to the same as the default axes.
419419
## Dimensions as fraction of fontsize:
420420
#legend.borderpad : 0.4 ## border whitespace
421421
#legend.labelspacing : 0.5 ## the vertical space between the legend entries

0 commit comments

Comments
 (0)
0