Skip to content

Ticks should not be affected by rcParams["lines.markeredgecolor"] #14559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/api/next_api_changes/2019-06-16-TH.rst
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 10 additions & 3 deletions lib/matplotlib/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -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'))
Expand All @@ -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'))
Expand Down