Skip to content

Commit b454a51

Browse files
committed
Fix issue where 'labelcolor' is overwritten during __init__ format()
1 parent 259a263 commit b454a51

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

proplot/axes/shared.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,17 @@ def _update_ticks(
6363
kwtext = {'label' + key: value for key, value in kwtext.items()}
6464
for b, which in zip((grid, gridminor), ('major', 'minor')):
6565
# Tick properties
66+
# NOTE: Must make 'tickcolor' overwrite 'labelcolor' or else 'color'
67+
# passed to __init__ will not apply correctly. Annoying but unavoidable
6668
kwticks = self._get_tick_props(x, which=which)
6769
if labelpad is not None:
6870
kwticks['pad'] = labelpad
6971
if tickcolor is not None:
7072
kwticks['color'] = tickcolor
71-
kwtext.setdefault('labelcolor', tickcolor)
73+
if rc._context_mode == 2:
74+
kwtext.setdefault('labelcolor', tickcolor)
75+
else:
76+
kwtext['labelcolor'] = tickcolor
7277
if ticklen is not None:
7378
kwticks['size'] = units(ticklen, 'pt')
7479
if which == 'minor':

0 commit comments

Comments
 (0)