Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ceef40c

Browse files
committed
fix
1 parent 3ac8224 commit ceef40c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/matplotlib/axis.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,17 @@ def __get__(self, instance, owner):
577577
rc._update_raw(orig)
578578
else:
579579
tick = instance._get_tick(major=self._major)
580+
# Re-apply any ``set_tick_params`` overrides to the fresh Tick.
581+
# Subclasses of ``Axis`` (e.g. the ``SkewXAxis`` in the skewt
582+
# gallery example) sometimes override ``_get_tick`` without
583+
# forwarding ``_{major,minor}_tick_kw``; calling ``_apply_params``
584+
# here guarantees those overrides still take effect, matching the
585+
# pre-lazy behaviour where the first tick was materialized eagerly
586+
# and updated in place by ``set_tick_params``.
587+
tick_kw = (instance._major_tick_kw if self._major
588+
else instance._minor_tick_kw)
589+
if tick_kw:
590+
tick._apply_params(**tick_kw)
580591
instance._propagate_axis_state_to_tick(tick)
581592
setattr(instance, attr, [tick])
582593
return getattr(instance, attr)

0 commit comments

Comments
 (0)