From 2c1d67bee5afee248c4c65387c88249c104051f5 Mon Sep 17 00:00:00 2001 From: Zach Pincus Date: Tue, 20 Mar 2012 14:53:43 -0400 Subject: [PATCH] ENH: Add option for axis-straddling 'inout' tics. --- lib/matplotlib/axis.py | 6 ++++++ matplotlibrc.template | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 5207772b8897..43db8b9b7f9f 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -330,6 +330,9 @@ def apply_tickdir(self, tickdir): if self._tickdir == 'in': self._tickmarkers = (mlines.TICKUP, mlines.TICKDOWN) self._pad = self._base_pad + elif self._tickdir == 'inout': + self._tickmarkers = ('|', '|') + self._pad = self._base_pad + self._size/2. else: self._tickmarkers = (mlines.TICKDOWN, mlines.TICKUP) self._pad = self._base_pad + self._size @@ -469,6 +472,9 @@ def apply_tickdir(self, tickdir): if self._tickdir == 'in': self._tickmarkers = (mlines.TICKRIGHT, mlines.TICKLEFT) self._pad = self._base_pad + elif self._tickdir == 'inout': + self._tickmarkers = ('_', '_') + self._pad = self._base_pad + self._size/2. else: self._tickmarkers = (mlines.TICKLEFT, mlines.TICKRIGHT) self._pad = self._base_pad + self._size diff --git a/matplotlibrc.template b/matplotlibrc.template index 67eb6089aca6..fd769bff2372 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -249,7 +249,7 @@ text.hinting_factor : 8 # Specifies the amount of softness for hinting in the #xtick.minor.pad : 4 # distance to the minor tick label in points #xtick.color : k # color of the tick labels #xtick.labelsize : medium # fontsize of the tick labels -#xtick.direction : in # direction: in or out +#xtick.direction : in # direction: in, out, or inout #ytick.major.size : 4 # major tick size in points #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 #ytick.minor.pad : 4 # distance to the minor tick label in points #ytick.color : k # color of the tick labels #ytick.labelsize : medium # fontsize of the tick labels -#ytick.direction : in # direction: in or out +#ytick.direction : in # direction: in, out, or inout ### GRIDS