Skip to content

Commit ecb6fa3

Browse files
committed
Add back 'color' as valid carteisan format arg, consistent with x/ycolor
1 parent 0ef87e7 commit ecb6fa3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

proplot/axes/cartesian.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def format(
775775
xmargin=None, ymargin=None,
776776
xticklen=None, yticklen=None,
777777
xlinewidth=None, ylinewidth=None,
778-
xcolor=None, ycolor=None,
778+
xcolor=None, ycolor=None, color=None, # special case (see below)
779779
xgridcolor=None, ygridcolor=None,
780780
xlabel_kw=None, ylabel_kw=None,
781781
xscale_kw=None, yscale_kw=None,
@@ -826,6 +826,12 @@ def format(
826826
xminorlocator_kw = xminorlocator_kw or {}
827827
yminorlocator_kw = yminorlocator_kw or {}
828828

829+
# Special case: normally we rely on rc settings like 'grid', 'labelpad',
830+
# etc. when x or y is not specified but bald 'color' is too vague. So
831+
# we apply 'color' right here.
832+
xcolor = _not_none(xcolor, color)
833+
ycolor = _not_none(ycolor, color)
834+
829835
# Flexible keyword args, declare defaults
830836
xtickdir = _not_none(xtickdir, rc.find('xtick.direction', context=True))
831837
ytickdir = _not_none(ytickdir, rc.find('ytick.direction', context=True))

0 commit comments

Comments
 (0)