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

Skip to content

Commit f7dd325

Browse files
committed
Merge pull request #780 from zachrahan/tics-inout
ENH: Add option for axis-straddling 'inout' tics.
2 parents 2c06a95 + 2c1d67b commit f7dd325

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/matplotlib/axis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ def apply_tickdir(self, tickdir):
330330
if self._tickdir == 'in':
331331
self._tickmarkers = (mlines.TICKUP, mlines.TICKDOWN)
332332
self._pad = self._base_pad
333+
elif self._tickdir == 'inout':
334+
self._tickmarkers = ('|', '|')
335+
self._pad = self._base_pad + self._size/2.
333336
else:
334337
self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP)
335338
self._pad = self._base_pad + self._size
@@ -469,6 +472,9 @@ def apply_tickdir(self, tickdir):
469472
if self._tickdir == 'in':
470473
self._tickmarkers = (mlines.TICKRIGHT, mlines.TICKLEFT)
471474
self._pad = self._base_pad
475+
elif self._tickdir == 'inout':
476+
self._tickmarkers = ('_', '_')
477+
self._pad = self._base_pad + self._size/2.
472478
else:
473479
self._tickmarkers = (mlines.TICKLEFT, mlines.TICKRIGHT)
474480
self._pad = self._base_pad + self._size

matplotlibrc.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
249249
#xtick.minor.pad : 4 # distance to the minor tick label in points
250250
#xtick.color : k # color of the tick labels
251251
#xtick.labelsize : medium # fontsize of the tick labels
252-
#xtick.direction : in # direction: in or out
252+
#xtick.direction : in # direction: in, out, or inout
253253

254254
#ytick.major.size : 4 # major tick size in points
255255
#ytick.minor.size : 2 # minor tick size in points
@@ -259,7 +259,7 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
259259
#ytick.minor.pad : 4 # distance to the minor tick label in points
260260
#ytick.color : k # color of the tick labels
261261
#ytick.labelsize : medium # fontsize of the tick labels
262-
#ytick.direction : in # direction: in or out
262+
#ytick.direction : in # direction: in, out, or inout
263263

264264

265265
### GRIDS

0 commit comments

Comments
 (0)