From 3bfd3b578e9a552514110047fe279ec32f59ae08 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 16 Jun 2019 19:45:29 +0200 Subject: [PATCH] Ticks should not be influenced by rcParams["lines.markeredgecolor"] --- doc/api/next_api_changes/2019-06-16-TH.rst | 7 +++++++ lib/matplotlib/axis.py | 13 ++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 doc/api/next_api_changes/2019-06-16-TH.rst diff --git a/doc/api/next_api_changes/2019-06-16-TH.rst b/doc/api/next_api_changes/2019-06-16-TH.rst new file mode 100644 index 000000000000..2ed6739bf56b --- /dev/null +++ b/doc/api/next_api_changes/2019-06-16-TH.rst @@ -0,0 +1,7 @@ +Tick line colors are no longer influenced by rcParams["lines.markeredgecolor"] +`````````````````````````````````````````````````````````````````````````````` + +Tick line colors are no longer influenced by :rc:`lines.markeredgecolor`. +You may use :rc:`xtick.color` / :rc:`ytick.color` to color tick lines and +labels simultaneously. If you just want to only the tick lines, do so +programmatically. diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index a2b487da785a..5dd4fb42465e 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -459,10 +459,14 @@ def _get_text2(self): def _get_tick1line(self): 'Get the default line2D instance' # x in data coords, y in axes coords - l = mlines.Line2D(xdata=(0,), ydata=(0,), color=self._color, - linestyle='None', marker=self._tickmarkers[0], + l = mlines.Line2D(xdata=(0,), ydata=(0,), + color=self._color, + linestyle='None', + marker=self._tickmarkers[0], markersize=self._size, - markeredgewidth=self._width, zorder=self._zorder) + markeredgecolor=self._color, + markeredgewidth=self._width, + zorder=self._zorder) l.set_transform(self.axes.get_xaxis_transform(which='tick1')) self._set_artist_props(l) return l @@ -475,6 +479,7 @@ def _get_tick2line(self): linestyle='None', marker=self._tickmarkers[1], markersize=self._size, + markeredgecolor=self._color, markeredgewidth=self._width, zorder=self._zorder) @@ -580,6 +585,7 @@ def _get_tick1line(self): marker=self._tickmarkers[0], linestyle='None', markersize=self._size, + markeredgecolor=self._color, markeredgewidth=self._width, zorder=self._zorder) l.set_transform(self.axes.get_yaxis_transform(which='tick1')) @@ -594,6 +600,7 @@ def _get_tick2line(self): marker=self._tickmarkers[1], linestyle='None', markersize=self._size, + markeredgecolor=self._color, markeredgewidth=self._width, zorder=self._zorder) l.set_transform(self.axes.get_yaxis_transform(which='tick2'))