Skip to content

Commit 54eb4be

Browse files
committed
Rename [abc|title].linewidth --> borderwidth
1 parent 5ecbac6 commit 54eb4be

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

docs/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Key(s) Description
113113
``abc.style`` a-b-c label style. For options, see `~proplot.axes.Axes.format`.
114114
``abc.loc`` a-b-c label position. For options, see `~proplot.axes.Axes.format`.
115115
``abc.border`` Boolean, indicates whether to draw a white border around a-b-c labels inside an axes.
116-
``abc.linewidth`` Width of the white border around a-b-c labels.
116+
``abc.borderwidth`` Width of the white border around a-b-c labels.
117117
``abc.color`` a-b-c label color.
118118
``abc.size`` a-b-c label font size.
119119
``abc.weight`` a-b-c label font weight.
@@ -175,7 +175,7 @@ Key(s) Description
175175
``tick.weight`` Axis tick label font weight. Mirrors the *axis* label :rcraw:`axes.labelweight` setting.
176176
``title.loc`` Title position. For options, see `~proplot.axes.Axes.format`.
177177
``title.border`` Boolean, indicates whether to draw a white border around titles inside an axes.
178-
``title.linewidth`` Width of the white border around titles.
178+
``title.borderwidth`` Width of the white border around titles.
179179
``title.pad`` The title offset in arbitrary units. Alias for :rcraw:`axes.titlepad`.
180180
``title.color`` Axes title color.
181181
``title.size`` Axes title font size.

proplot/axes.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,16 @@ def format(
771771
# A-b-c labels
772772
titles_dict = self._titles_dict
773773
if not self._panel_side:
774-
# Location and text
774+
# Properties
775+
kw = rc.fill({
776+
'fontsize': 'abc.size',
777+
'weight': 'abc.weight',
778+
'color': 'abc.color',
779+
'border': 'abc.border',
780+
'borderwidth': 'abc.borderwidth',
781+
'fontfamily': 'font.family',
782+
}, context=True)
783+
# Label format
775784
abcstyle = rc.get('abc.style', context=True) # 1st run, or changed
776785
if abcstyle and self.number is not None:
777786
if not isinstance(abcstyle, str) or (
@@ -808,17 +817,14 @@ def format(
808817
# Tricky because we have to reconcile two workflows:
809818
# 1. title='name' and titleloc='position'
810819
# 2. ltitle='name', rtitle='name', etc., arbitrarily many titles
811-
# First update existing titles
812-
# NOTE: _update_title should never return new objects unless called
813-
# with *inner* titles... *outer* titles will just refresh, so we
814-
# don't need to re-assign the attributes or anything.
815-
loc, obj, kw = self._get_title_props()
816-
if kw:
817-
for iloc, iobj in titles_dict.items():
818-
if iloc is self._abc_loc:
819-
continue
820-
titles_dict[iloc] = self._update_title(iobj, **kw)
821-
820+
kw = rc.fill({
821+
'fontsize': 'title.size',
822+
'weight': 'title.weight',
823+
'color': 'title.color',
824+
'border': 'title.border',
825+
'borderwidth': 'title.borderwidth',
826+
'fontfamily': 'font.family',
827+
}, context=True)
822828
# Workflow 2, want this to come first so workflow 1 gets priority
823829
for iloc, ititle in zip(
824830
('l', 'r', 'c', 'ul', 'uc', 'ur', 'll', 'lc', 'lr'),

proplot/rctools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def get_ipython():
8080
}
8181
defaultParamsLong = {
8282
'abc.border': True,
83+
'abc.borderwidth': 1.5,
8384
'abc.color': 'k',
84-
'abc.linewidth': 1.5,
8585
'abc.loc': 'l', # left side above the axes
8686
'abc.size': None, # = large
8787
'abc.style': 'a',
@@ -153,8 +153,8 @@ def get_ipython():
153153
'tick.labelsize': None, # = small
154154
'tick.labelweight': 'normal',
155155
'title.border': True,
156+
'title.borderwidth': 1.5,
156157
'title.color': 'k',
157-
'title.linewidth': 1.5,
158158
'title.loc': 'c', # centered above the axes
159159
'title.pad': 3.0, # copy
160160
'title.size': None, # = large

0 commit comments

Comments
 (0)