diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex | 215 |
1 files changed, 124 insertions, 91 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex index 88e1bea367b..facc28cbe67 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex @@ -598,27 +598,27 @@ \def\pgfplots@user@ticklabel@list@x{% \pgfplotslistselectorempty\ticknum\of\pgfplots@xticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@user@ticklabel@list@y{% \pgfplotslistselectorempty\ticknum\of\pgfplots@yticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@user@ticklabel@list@z{% \pgfplotslistselectorempty\ticknum\of\pgfplots@zticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@user@extra@ticklabel@list@x{% \pgfplotslistselectorempty\ticknum\of\pgfplots@extra@xticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@user@extra@ticklabel@list@y{% \pgfplotslistselectorempty\ticknum\of\pgfplots@extra@yticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@user@extra@ticklabel@list@z{% \pgfplotslistselectorempty\ticknum\of\pgfplots@extra@zticklabels\to\tick - \tick + \pgfplots@ticklabel@typeset@arg\tick } \def\pgfplots@limit@max@reg#1{% @@ -639,55 +639,59 @@ % Check if a label does not cross the x-axis \def\pgfplots@ytick@check@tickshow{% \pgfplots@tickshowtrue - \if\pgfplots@yaxislinesnum2% center - \ifcase\pgfplots@xaxislinesnum\relax - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@min@reg{y}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@max@reg{y}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \or - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@min@reg{y}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{% - }% - \or - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@logical@ZERO@y pt} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \or + \ifpgfplots@hide@obscured@ytick + \if\pgfplots@yaxislinesnum2% center + \ifcase\pgfplots@xaxislinesnum\relax + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@min@reg{y}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@max@reg{y}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@min@reg{y}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{% + }% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@logical@ZERO@y pt} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@max@reg{y}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \fi + \fi + \fi +} +\def\pgfplots@ztick@check@tickshow{% + \pgfplots@tickshowtrue + \ifpgfplots@hide@obscured@ztick + \if\pgfplots@zaxislinesnum2% center \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@max@reg{y}} + {\pgfplots@tmpa}{\pgfplots@logical@ZERO@z pt} {\pgfplots@loc@tick@placement@tolerance} {% \pgfplots@tickshowfalse }{}% \fi \fi -} -\def\pgfplots@ztick@check@tickshow{% - \pgfplots@tickshowtrue - \if\pgfplots@zaxislinesnum2% center - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@logical@ZERO@z pt} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \fi }% % Fills the macros @@ -823,41 +827,43 @@ % This is just a special case for centered axis lines. \def\pgfplots@xtick@check@tickshow{% \pgfplots@tickshowtrue - \if\pgfplots@xaxislinesnum2% center - \ifcase\pgfplots@yaxislinesnum\relax - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@min@reg{x}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@max@reg{x}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \or - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@min@reg{x}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \or - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@logical@ZERO@x pt} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% - \or - \pgfplotsmath@ifapproxequal@dim - {\pgfplots@tmpa}{\pgfplots@limit@max@reg{x}} - {\pgfplots@loc@tick@placement@tolerance} - {% - \pgfplots@tickshowfalse - }{}% + \ifpgfplots@hide@obscured@xtick + \if\pgfplots@xaxislinesnum2% center + \ifcase\pgfplots@yaxislinesnum\relax + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@min@reg{x}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@max@reg{x}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@min@reg{x}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@logical@ZERO@x pt} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \or + \pgfplotsmath@ifapproxequal@dim + {\pgfplots@tmpa}{\pgfplots@limit@max@reg{x}} + {\pgfplots@loc@tick@placement@tolerance} + {% + \pgfplots@tickshowfalse + }{}% + \fi \fi \fi } @@ -1259,6 +1265,14 @@ % region. Tick lines (and grid lines) won't extend to the left or % right of axis #1. \def\pgfplots@drawtickgridlines@INSTALLCLIP@onorientedsurf#1{% + \ifpgfplots@enable@tick@line@clipping + % this is LEGACY SUPPORT only. I did not want to change + % existing bounding boxes. + % Starting with 'compat=1.11', this is OFF. + \pgfplots@drawtickgridlines@INSTALLCLIP@onorientedsurf@{#1}% + \fi +} +\def\pgfplots@drawtickgridlines@INSTALLCLIP@onorientedsurf@#1{% \pgfinterruptboundingbox% \begingroup % the case ||e_b|| == 0 should never happen here! Should be @@ -1280,16 +1294,35 @@ \relax }{% \begingroup - \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{0}{% + % FIXME : the case of centered axis lines is missing here. + % 0 = lower limit, + % 1 = upper limit + % 2 = centered... + % Currently, "0" is also used for centered axis lines. + \if 2\csname pgfplots@\pgfplotspointonorientedsurfaceA axislinesnum\endcsname + % centered axis lines need no complicated visibility + % checks. They need tick lines in *any* case. + % So, enabled them here! \def\pgfplots@drawticklines@for@placecomputedtick@LOWEROK{1}% - }{% - \def\pgfplots@drawticklines@for@placecomputedtick@LOWEROK{0}% - }% - \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{1}{% - \def\pgfplots@drawticklines@for@placecomputedtick@UPPEROK{1}% - }{% + % + % UPPEROK is unnecessary in this context - for centered + % axis lines, it will be disabled anyway because the + % styles like 'axis x line*' set \pgfplots@xticknum to + % center - and that means that no tick lines will be drawn + % (see below). \def\pgfplots@drawticklines@for@placecomputedtick@UPPEROK{0}% - }% + \else + \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{0}{% + \def\pgfplots@drawticklines@for@placecomputedtick@LOWEROK{1}% + }{% + \def\pgfplots@drawticklines@for@placecomputedtick@LOWEROK{0}% + }% + \pgfplots@ifaxisline@B@onorientedsurf@should@be@drawn{1}{% + \def\pgfplots@drawticklines@for@placecomputedtick@UPPEROK{1}% + }{% + \def\pgfplots@drawticklines@for@placecomputedtick@UPPEROK{0}% + }% + \fi \if\pgfkeysvalueof{/pgfplots/\pgfplotspointonorientedsurfaceB\space dir/value}r% % local special handling for reversed axes: exchange % meaning of 'left' and 'right' here. |