From 1802e697e06bf318670333d292b5d602fa806f23 Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Fri, 30 May 2014 16:49:16 -0700 Subject: [PATCH 1/2] Adding rcParams option for axis.labelpad --- lib/matplotlib/axis.py | 2 +- lib/matplotlib/rcsetup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 6d31f1ba9c3b..b7c52a2bddbb 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -653,7 +653,7 @@ def __init__(self, axes, pickradius=15): self._smart_bounds = False self.label = self._get_label() - self.labelpad = 5 + self.labelpad = rcParams['axes.labelpad'] self.offsetText = self._get_offset_text() self.majorTicks = [] self.minorTicks = [] diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index bb228d7d2de3..e0f9af5df578 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -585,6 +585,7 @@ def __call__(self, s): # axis locator 'axes.labelsize': ['medium', validate_fontsize], # fontsize of the # x any y labels + 'axes.labelpad': [5.0, validate_float], # space between label and axis 'axes.labelweight': ['normal', six.text_type], # fontsize of the x any y labels 'axes.labelcolor': ['k', validate_color], # color of axis label 'axes.formatter.limits': [[-7, 7], validate_nseq_int(2)], From 0242b7765fea34fd71e4bbf79cbc1613990c272b Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Fri, 30 May 2014 16:57:08 -0700 Subject: [PATCH 2/2] Updating matplotlibrc.template --- matplotlibrc.template | 1 + 1 file changed, 1 insertion(+) diff --git a/matplotlibrc.template b/matplotlibrc.template index 4319f1397136..2ee2520a9de1 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -237,6 +237,7 @@ backend : %(backend)s #axes.grid : False # display grid or not #axes.titlesize : large # fontsize of the axes title #axes.labelsize : medium # fontsize of the x any y labels +#axes.labelpad : 5.0 # space between label and axis #axes.labelweight : normal # weight of the x and y labels #axes.labelcolor : black #axes.axisbelow : False # whether axis gridlines and ticks are below