texlive[47373] Master/texmf-dist: pgfplots (7apr18)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 8 21:45:43 CEST 2018


Revision: 47373
          http://tug.org/svn/texlive?view=revision&revision=47373
Author:   karl
Date:     2018-04-08 21:45:42 +0200 (Sun, 08 Apr 2018)
Log Message:
-----------
pgfplots (7apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf
    trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc
    trunk/Master/texmf-dist/doc/generic/pgfplots/README
    trunk/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf
    trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2
    trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf
    trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf
    trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf
    trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf
    trunk/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf
    trunk/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2
    trunk/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2
    trunk/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.fillbetween.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfcontrib/pgflibraryfillbetween.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
    trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_leq.code.tex

Modified: trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc
===================================================================
--- trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/doc/context/third/pgfplots/pgfplotsexample-context.tuc	2018-04-08 19:45:42 UTC (rev 47373)
@@ -2,9 +2,9 @@
 
 utilitydata.comment={
  ["escape"]="[===[ ... ]===]",
- ["file"]="tex.jobname",
+ ["file"]="pgfplotsexample-context",
  ["format"]="cont-en",
- ["stamp"]="2016.05.17 19:20",
+ ["stamp"]="2017.06.04 16:55",
  ["version"]=1.3,
 }
 
@@ -103,7 +103,7 @@
   { 1 },
  },
  ["subpage"]={
-  { 0 },
+  { 1 },
  },
  ["table"]={
   { 0 },

Modified: trunk/Master/texmf-dist/doc/generic/pgfplots/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgfplots/README	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/doc/generic/pgfplots/README	2018-04-08 19:45:42 UTC (rev 47373)
@@ -23,7 +23,7 @@
 and
   doc/latex/pgfplots/pgfplotstable.pdf.
 
-Copyright 2007-2016 by Christian Feuersaenger.
+Copyright 2007-2017 by Christian Feuersaenger.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -40,6 +40,21 @@
 
 
 HISTORY:
+1.16:
+- fixed bug #111 [fillbetween] strange behavior when `soft clip` is used and one of the paths touches the axis border
+- fixed bug #183: Nan in the first line of a numeric table was interpreted as column name
+- fixed bug #187 Wrong output from mod in axis 
+- fixed bug #109 `visualization depends on` doesn't work with table from pgfplotstable is now fixed for numeric values
+- fixed bug: \pgfplotstablenew was unable to create tables with 0 or 1 rows.
+- fixed bug: 114 fillbetween suffered from inaccuracy (produced invisible segments)
+- fixed bug #139 [fillbetween] numerical issues with dense points 
+- fixed bug #153: \begin{tikzpicture}[scale=...] combined with fill between or
+  'set layers' resulted in a wrong bounding box
+- \addplot gnuplot: autodetected unbounded coordinates
+- new feature: parse tick positions using math parser (tracker #69)
+- new feature: programmatic access to axis coordinates for given canvas coordinates (\pgfplotspointgetcoordinates, tracker 68)
+- new feature: 'x filter/.append expression', a stackable variant of 'x filter/.expression'
+
 1.15: bugfix release
 - fixed regression: fpu caused forest library to fail as soon as one loads pgfplots
 - fixed bug #149 : \edef{...\to...} was wrong and caused \pgfplotstablevertcat to fail 

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/TeX-programming-notes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplots.doc.src.tar.bz2
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplots.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotsexample.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotstable.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pgfplots/pgfplotstodo.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/plain/pgfplots/pgfplotsexample-plain.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/context/third/pgfplots/pgfplotstests.context.tar.bz2
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/pgfplots/pgfplotstests.tar.bz2
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.fillbetween.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.fillbetween.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.fillbetween.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -50,13 +50,46 @@
 \usetikzlibrary{fillbetween}
 \usepgfplotslibrary{decorations.softclip}
 
+% Takes a domain #1:#2 and returns a new domain \pgfplotsretval:\pgfplotsretvalb which is larger.
+\def\pgfplots at softclip@enlarge#1#2{%
+	\begingroup
+	\pgfplotscoordmath{default}{parse}{0.1*(#2-#1)}\let\pgfplots at diff=\pgfmathresult
+	\pgfplotscoordmath{default}{if is}{\pgfplots at diff}{+}{%
+		% ok, max > min. Should always be the case.
+		\pgfplotscoordmath{default}{parse}{#1-\pgfplots at diff}\let\pgfplots at min=\pgfmathresult
+		\pgfplotscoordmath{default}{parse}{#2+\pgfplots at diff}\let\pgfplots at max=\pgfmathresult
+	}{%
+		\pgfplotscoordmath{default}{if is}{\pgfplots at diff}{0}{%
+			% ok, max == min. Very Strange.
+			\pgfplotscoordmath{default}{parse}{#1-1}\let\pgfplots at min=\pgfmathresult
+			\pgfplotscoordmath{default}{parse}{#2+1}\let\pgfplots at max=\pgfmathresult
+		}{%
+			% ok, max < min. Strange.
+			\pgfplotscoordmath{default}{parse}{#1+\pgfplots at diff}\let\pgfplots at min=\pgfmathresult
+			\pgfplotscoordmath{default}{parse}{#2-\pgfplots at diff}\let\pgfplots at max=\pgfmathresult
+		}%
+	}%
+	\global\let\pgfplots at glob@TMPa=\pgfplots at min
+	\global\let\pgfplots at glob@TMPb=\pgfplots at max
+	\endgroup
+	\let\pgfplotsretval=\pgfplots at glob@TMPa
+	\let\pgfplotsretvalb=\pgfplots at glob@TMPb
+}%
+
 \pgfkeys{
 	/pgfplots/every fill between plot/.style={/pgfplots/area legend,/tikz/fill,/pgfplots/on layer=pre main},
 	/tikz/soft clip assign/domain/.code args={#1:#2}{%
 		\pgfplotsifisvisualizationphase{%
+			\ifpgfplots at yislinear
+				\pgfplots at softclip@enlarge
+					{min(\pgfkeysvalueof{/pgfplots/ymin},\pgfplots at data@ymin)}%
+					{max(\pgfkeysvalueof{/pgfplots/ymax},\pgfplots at data@ymax)}%
+			\else
+				\pgfplots at softclip@enlarge{\pgfkeysvalueof{/pgfplots/ymin}}{\pgfkeysvalueof{/pgfplots/ymax}}%
+			\fi
 			\edef\pgfplots at loc@TMPa{%
-				(axis cs:#1,\pgfkeysvalueof{/pgfplots/ymin})
-				rectangle (axis cs:#2,\pgfkeysvalueof{/pgfplots/ymax})}%
+				(axis cs:#1,\pgfplotsretval)
+				rectangle (axis cs:#2,\pgfplotsretvalb)}%
 			\pgfkeysalso{/tikz/soft clip assign/path/.expand once=\pgfplots at loc@TMPa}%
 		}{}%
 	},%
@@ -63,9 +96,16 @@
 	/tikz/soft clip assign/y domain y/.style={/tikz/soft clip assign/domain y={#1}},
 	/tikz/soft clip assign/domain y/.code args={#1:#2}{%
 		\pgfplotsifisvisualizationphase{%
+			\ifpgfplots at yislinear
+				\pgfplots at softclip@enlarge
+					{min(\pgfkeysvalueof{/pgfplots/xmin},\pgfplots at data@xmin)}%
+					{max(\pgfkeysvalueof{/pgfplots/xmax},\pgfplots at data@xmax)}%
+			\else
+				\pgfplots at softclip@enlarge{\pgfkeysvalueof{/pgfplots/xmin}}{\pgfkeysvalueof{/pgfplots/xmax}}%
+			\fi
 			\edef\pgfplots at loc@TMPa{%
-				(axis cs:\pgfkeysvalueof{/pgfplots/xmin},#1)
-				rectangle (axis cs:\pgfkeysvalueof{/pgfplots/xmax},#2)}%
+				(axis cs:\pgfplotsretval,#1)
+				rectangle (axis cs:\pgfplotsretvalb,#2)}%
 			\pgfkeysalso{/tikz/soft clip assign/path/.expand once=\pgfplots at loc@TMPa}%
 		}{}%
 	},%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -1159,8 +1159,15 @@
 	\else
 		\def\pgfplotstable at loc@TMPa{#2}%
 	\fi
+	%
+	% let the table contain one column named '@@@@@temporary at column@':
 	\pgfplotslistnew#3{@@@@@temporary at column@\\}%
-	\expandafter\pgfplots at assign@list\csname\string#3@@@@@@temporary at column@\endcsname{1,2,...,\pgfplotstable at loc@TMPa}%
+	% populate the temporary column with enough rows:
+	\ifnum\pgfplotstable at loc@TMPa>0
+		\expandafter\pgfplots at assign@list\csname\string#3@@@@@@temporary at column@\endcsname{1,...,\pgfplotstable at loc@TMPa}%
+	\else
+		\expandafter\pgfplotslistnewempty\csname\string#3@@@@@@temporary at column@\endcsname%
+	\fi
 	%
 	% now, create all real columns:
 	\pgfplotstableset{#1,%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -1731,11 +1731,36 @@
 	\ifpgfplotstable at search@header
 		\ifpgfplotstableread at curline@contains at colnames
 		\else
-			\pgfplotstableread at isnumber@ITERATE#1\pgfplotstable at EOI
+			\def\pgfplotstableread at CURTOK{#1}%
+			% can we safely use the \pgfmathfloatparsenumber here? I
+			% doubt it -- what if the header contains macros?
+			%
+			% there is no (simple) expandable "to lower case". check
+			% for the most common forms here.
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@nan
+			\else
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@NaN
+			\else
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@NAN
+			\else
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@inf
+			\else
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@Inf
+			\else
+			\ifx\pgfplotstableread at CURTOK\pgfplotstableread at isnumber@INF
+			\else
+				\pgfplotstableread at isnumber@ITERATE#1\pgfplotstable at EOI
+			\fi\fi\fi\fi\fi\fi
 %\ifpgfplotstableread at curline@contains at colnames\pgfplots at message{'#1' is a column name!}\else\pgfplots at message{'#1' is NO column name!}\fi
 		\fi
 	\fi
 }
+\def\pgfplotstableread at isnumber@nan{nan}
+\def\pgfplotstableread at isnumber@NaN{NaN}
+\def\pgfplotstableread at isnumber@NAN{NAN}
+\def\pgfplotstableread at isnumber@inf{inf}
+\def\pgfplotstableread at isnumber@INF{INF}
+\def\pgfplotstableread at isnumber@Inf{Inf}
 \def\pgfplotstableread at isnumber@plus{+}
 \def\pgfplotstableread at isnumber@minus{-}
 \def\pgfplotstableread at isnumber@zero{0}

Added: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_leq.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_leq.code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_leq.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -0,0 +1,279 @@
+% ======================================================
+% compatibility with PGF 3.0.1a
+% ======================================================
+%
+%%% This file is a copy of some part of PGF/Tikz.
+%%% It has been copied here to provide :
+%%%  - compatibility with older PGF versions
+%%%  - availability of PGF contributions by Christian Feuersaenger
+%%%    which are necessary or helpful for pgfplots.
+%%%
+%%% It contains a couple of patches such that selected changes which
+%%% are also part of PGF/TikZ (and can be found in the development
+%%% version of PGF/TikZ) are available within pgfplots.
+%%%
+%%% this file contains solvers which have been written by Christian Feuersaenger (primarily, but not only, for pgfplots)
+
+% Solves a linear equation system of size 2x2 using gauss elimination.
+%
+% It employs TeX register arithmetics to do so.
+% #1: should contain 4 sets of braces with matrix entries, 
+% 	{<a11>}{<a12>}
+% 	{<a21>}{<a22>}
+% 	where each entry should be a number without unit.
+% 	It is acceptable if '#1' is a macro which expands to the expected
+% 	format.
+% #2: should contain 2 sets of braces with the right-hand-side,
+% 	{<r1>}{<r2>}
+% 	where each entry should be a number without unit.
+% 	It is acceptable if '#2' is a macro which expands to the expected
+% 	format.
+%
+% It will assign \pgfmathresult to contain two sets of braces with the
+% result.
+%
+% Example:
+% \pgfutilsolvetwotwoleq{
+% 	{0.24}{1}
+% 	{-0.97}{0}
+% }{
+% 	{-7}
+% 	{18}
+% }
+% -> yields \pgfmathresult={−18.55618}{−2.54642}
+%
+% The algorithm employs column pivotisation.
+%
+% If the matrix is singular, the routine will return {}.
+\def\pgfutilsolvetwotwoleq#1#2{%
+	\begingroup
+		\dimendef\aa=0
+		\dimendef\ab=1
+		\dimendef\ba=2
+		\dimendef\bb=3
+		\dimendef\ra=4
+		\dimendef\rb=5
+		\dimendef\tmpa=6
+		\dimendef\tmpb=7
+		\edef\pgf at temp{#1}%
+		\expandafter\pgfutilsolvetwotwoleq at A\pgf at temp
+		\edef\pgf at temp{#2}%
+		\expandafter\pgfutilsolvetwotwoleq at r\pgf at temp
+		%
+		\pgfutilsolvetwotwoleq at ifislarger\aa\ba{%
+			% identity "permutation":
+			\def\Pa{a}%
+			\def\Pb{b}%
+		}{%
+			% permutation matrix: switch rows!
+			\def\Pa{b}%
+			\def\Pb{a}%
+		}%
+		% \pivot := 1/aa
+		\tmpa=\csname m\Pa a\endcsname pt %
+		\ifdim\tmpa<0pt \tmpa=-\tmpa\fi
+		\ifdim\tmpa<0.0001pt
+			% singular matrix!
+			\let\pgfmathresult=\pgfutil at empty
+		\else
+			\pgfmathreciprocal@
+				{\csname m\Pa a\endcsname}%
+			\let\pivot=\pgfmathresult
+			%
+			% \factor := 1/aa * ba 
+			\csname \Pb a\endcsname=\pivot\csname \Pb a\endcsname
+			\edef\factor{\expandafter\pgf at sys@tonumber\csname \Pb a\endcsname}%
+			%
+			% bb -= ba/aa * ab
+			\tmpa=-\factor\csname \Pa b\endcsname
+			\advance\csname \Pb b\endcsname by\tmpa
+			%
+			% rb -= ba/aa * ra
+			\tmpa=-\factor\csname r\Pa\endcsname
+			\advance\csname r\Pb\endcsname by\tmpa
+			%
+			\tmpa=\csname \Pb b\endcsname%
+			\ifdim\tmpa<0pt \tmpa=-\tmpa\fi
+			\ifdim\tmpa<0.0001pt
+				% singular matrix!
+				\let\pgfmathresult=\pgfutil at empty
+			\else
+				% xb := rb / bb (the modified rb and modified bb!)
+				\pgfmathdivide@
+					{\expandafter\pgf at sys@tonumber\csname r\Pb\endcsname}
+					{\expandafter\pgf at sys@tonumber\csname \Pb b\endcsname}%
+				\expandafter\let\csname pgfmathresult\Pb\endcsname=\pgfmathresult
+				%
+				% ra := ra - xb * ab
+				\tmpa=\csname pgfmathresult\Pb\endcsname\csname \Pa b\endcsname
+				\advance\csname r\Pa\endcsname by-\tmpa
+				%
+				% xa := 1/aa * ra  (the modified ra!)
+				\tmpa=\pivot\csname r\Pa\endcsname
+				\expandafter\edef\csname pgfmathresult\Pa\endcsname{\pgf at sys@tonumber\tmpa}%
+				%
+				\edef\pgfmathresult{%
+					{\csname pgfmathresult\Pa\endcsname}%
+					{\csname pgfmathresult\Pb\endcsname}%
+				}%
+			\fi
+		\fi
+		\pgfmath at smuggleone\pgfmathresult
+	\endgroup
+}%
+
+\def\pgfutilsolvetwotwoleq at ifislarger#1#2#3#4{%
+	\tmpa=#1
+	\ifdim\tmpa<0pt
+		\multiply\tmpa by-1
+	\fi
+	\tmpb=#2
+	\ifdim\tmpb<0pt
+		\multiply\tmpb by-1
+	\fi
+	\ifdim\tmpa>\tmpb
+		#3%
+	\else
+		#4%
+	\fi
+}%
+
+\def\pgfutilsolvetwotwoleqfloat at ifislarger#1#2#3#4{%
+	\pgfmathfloatabs@{#1}\let\tmpa=\pgfmathresult
+	\pgfmathfloatabs@{#2}\let\tmpb=\pgfmathresult
+	\pgfmathfloatlessthan@{\tmpb}{\tmpa}%
+	\ifpgfmathfloatcomparison
+		#3%
+	\else
+		#4%
+	\fi
+}%
+\def\pgfutilsolvetwotwoleq at A#1#2#3#4{%
+	\def\maa{#1}\def\mab{#2}%
+	\def\mba{#3}\def\mbb{#3}%
+	\aa=#1pt \ab=#2pt
+	\ba=#3pt \bb=#4pt
+}
+\def\pgfutilsolvetwotwoleq at r#1#2{%
+	\ra=#1pt \rb=#2pt
+}%
+\def\pgfutilsolvetwotwoleqfloat at A#1#2#3#4{%
+	\pgfmathfloatparsenumber{#1}\let\maa=\pgfmathresult
+	\pgfmathfloatparsenumber{#2}\let\mab=\pgfmathresult
+	\pgfmathfloatparsenumber{#3}\let\mba=\pgfmathresult
+	\pgfmathfloatparsenumber{#4}\let\mbb=\pgfmathresult
+}
+\def\pgfutilsolvetwotwoleqfloat at r#1#2{%
+	\pgfmathfloatparsenumber{#1}\let\ra=\pgfmathresult
+	\pgfmathfloatparsenumber{#2}\let\rb=\pgfmathresult
+}%
+
+% Same as \pgfutilsolvetwotwoleq, but using floating point
+% arithmetics. The return value is still in fixed point.
+\def\pgfutilsolvetwotwoleqfloat#1#2{%
+	\begingroup
+		\pgfmathfloatcreate{1}{1.0}{-4}% FIXME : use a smaller threshold for FPU?
+		\let\thresh=\pgfmathresult
+		%
+		\edef\pgf at temp{#1}%
+		\expandafter\pgfutilsolvetwotwoleqfloat at A\pgf at temp
+		\edef\pgf at temp{#2}%
+		\expandafter\pgfutilsolvetwotwoleqfloat at r\pgf at temp
+		%
+		\pgfutilsolvetwotwoleqfloat at ifislarger\maa\mba{%
+			% identity "permutation":
+			\def\Pa{a}%
+			\def\Pb{b}%
+		}{%
+			% permutation matrix: switch rows!
+			\def\Pa{b}%
+			\def\Pb{a}%
+		}%
+		% \pivot := 1/aa
+		\expandafter\pgfmathfloatabs@\expandafter{\csname m\Pa a\endcsname}%
+		\let\tmpa=\pgfmathresult
+		\pgfmathfloatlessthan@{\tmpa}{\thresh}%
+		\ifpgfmathfloatcomparison
+			% singular matrix!
+			\let\pgfmathresult=\pgfutil at empty
+		\else
+			\expandafter\pgfmathfloatreciprocal@\expandafter{\csname m\Pa a\endcsname}%
+			\let\pivot=\pgfmathresult
+			%
+			% \factor := 1/aa * ba 
+			\expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pb a\endcsname}{\pivot}%
+			\let\factor=\pgfmathresult
+			\expandafter\let\csname m\Pb a\endcsname=\factor
+			%
+			% bb -= ba/aa * ab
+			\expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pa b\endcsname}{\factor}%
+			\let\tmpa=\pgfmathresult
+			\expandafter\pgfmathfloatsubtract@\expandafter{\csname m\Pb b\endcsname}{\tmpa}%
+			\expandafter\let\csname m\Pb b\endcsname=\pgfmathresult
+			%
+			% rb -= ba/aa * ra
+			\expandafter\pgfmathfloatmultiply@\expandafter{\csname r\Pa\endcsname}{\factor}%
+			\let\tmpa=\pgfmathresult
+			\expandafter\pgfmathfloatsubtract@\expandafter{\csname r\Pb\endcsname}{\tmpa}%
+			\expandafter\let\csname r\Pb\endcsname=\pgfmathresult
+			%
+			\expandafter\pgfmathfloatabs@\expandafter{\csname m\Pb b\endcsname}%
+			\let\tmpa=\pgfmathresult
+			\pgfmathfloatlessthan@{\tmpa}{\thresh}%
+			\ifpgfmathfloatcomparison
+				% singular matrix!
+				\let\pgfmathresult=\pgfutil at empty
+			\else
+				% xb := rb / bb (the modified rb and modified bb!)
+				\edef\pgf at marshal{
+					\noexpand\pgfmathfloatdivide@
+						{\csname r\Pb\endcsname}
+						{\csname m\Pb b\endcsname}%
+				}%
+				\pgf at marshal
+				\expandafter\let\csname pgfmathresult\Pb\endcsname=\pgfmathresult
+				\let\tmpa=\pgfmathresult
+				%
+				% ra := ra - xb * ab
+				\expandafter\pgfmathfloatmultiply@\expandafter{\csname m\Pa b\endcsname}{\tmpa}%
+				\let\tmpa=\pgfmathresult
+				\expandafter\pgfmathfloatsubtract@\expandafter{\csname r\Pa\endcsname}{\tmpa}%
+				\expandafter\let\csname r\Pa\endcsname=\pgfmathresult
+				%
+				% xa := 1/aa * ra  (the modified ra!)
+				\expandafter\pgfmathfloatmultiply@\expandafter{\csname r\Pa\endcsname}{\pivot}%
+				\expandafter\let\csname pgfmathresult\Pa\endcsname=\pgfmathresult
+				%
+				\edef\pgfmathresult{%
+					{\csname pgfmathresult\Pa\endcsname}%
+					{\csname pgfmathresult\Pb\endcsname}%
+				}%
+				\expandafter\pgfutilsolvetwotwoleqfloat at to@pgf at range\pgfmathresult
+			\fi
+		\fi
+		\pgfmath at smuggleone\pgfmathresult
+	\endgroup
+}%
+
+
+\def\pgfutilsolvetwotwoleqfloat at to@pgf at range#1#2{%
+	\pgfmathfloatcreate{1}{1.6}{4}\let\pgfutilsolvetwotwoleqfloat at to@pgf at range@max=\pgfmathresult
+	\pgfmathfloatabs@{#1}%
+	\expandafter\pgfmathfloatlessthan@\expandafter{\pgfmathresult}{\pgfutilsolvetwotwoleqfloat at to@pgf at range@max}%
+	\ifpgfmathfloatcomparison
+		\pgfmathfloatabs@{#2}%
+		\expandafter\pgfmathfloatlessthan@\expandafter{\pgfmathresult}{\pgfutilsolvetwotwoleqfloat at to@pgf at range@max}%
+		\ifpgfmathfloatcomparison
+			% ok.
+			\pgfmathfloattofixed{#1}\let\tmpa=\pgfmathresult
+			\pgfmathfloattofixed{#2}%
+			\edef\pgfmathresult{{\tmpa}{\pgfmathresult}}%
+		\else
+			% singular (because PGF cannot represent its result
+			\let\pgfmathresult=\pgfutil at empty
+		\fi
+	\else
+		% singular (because PGF cannot represent its result
+		\let\pgfmathresult=\pgfutil at empty
+	\fi
+}%


Property changes on: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_leq.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -114,8 +114,7 @@
 \fi
 
 
-
-\pgfutil at ifundefined{pgfmathfloatatan2}{
+\pgfutil at ifundefined{pgfmathfloat at stack@push at operand@single at str}{
 	\gdef\pgfplots at glob@TMPa{1}%
 }
 {}%
@@ -323,5 +322,40 @@
 	% ok, plot function is up-to-date
 }%
 
+\def\pgfmathfloatmod at broken#1#2{%
+	\begingroup
+	\pgfmathfloatdivide@{#1}{#2}%
+	\pgfmathfloatint@{\pgfmathresult}%
+	\let\pgfmathfloat at loc@TMPa=\pgfmathresult
+	\pgfmathfloatmultiply@{\pgfmathfloat at loc@TMPa}{#2}%
+	\let\pgfmathfloat at loc@TMPb=\pgfmathresult
+	\pgfmathfloatsubtract@{#1}{\pgfmathfloat at loc@TMPb}%
+	\pgfmath at smuggleone\pgfmathresult
+	\endgroup
+}
 
+\ifx\pgfmathfloatmod@\pgfmathfloatmod at broken
+	\def\pgfmathfloatmod@#1#2{%
+		\begingroup
+		\pgfmathfloattoint{#1}%
+		\let\pgfmathfloat at loc@TMPa=\pgfmathresult
+		\pgfmathfloattoint{#2}%
+		\let\pgfmathfloat at loc@TMPb=\pgfmathresult
+		\c at pgfmath@counta=\pgfmathfloat at loc@TMPa\relax
+		\divide\c at pgfmath@counta by\pgfmathfloat at loc@TMPb\relax
+		\expandafter\pgfmathfloatparsenumber\expandafter{\the\c at pgfmath@counta}%
+		%
+		\let\pgfmathfloat at loc@TMPa=\pgfmathresult
+		\pgfmathfloatmultiply@{\pgfmathfloat at loc@TMPa}{#2}%
+		\let\pgfmathfloat at loc@TMPb=\pgfmathresult
+		\pgfmathfloatsubtract@{#1}{\pgfmathfloat at loc@TMPb}%
+		\pgfmath at smuggleone\pgfmathresult
+		\endgroup
+	}
+\fi
+
+\pgfutil at IfUndefined{pgfutilsolvetwotwoleqfloat}{%
+	\input pgfplotsoldpgfsupp_leq.code.tex
+}{}%
+
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -19,7 +19,7 @@
 % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything:
 % This file comes without any warranty as the rest of pgfplots; there is no obligation for help.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Do 31. Dez 19:01:21 CET 2015 %%%
+%%% Date of this copy: Fr 10. Nov 17:18:26 CET 2017 %%%
 
 
 
@@ -90,7 +90,7 @@
 			\pgfmathfloatparsenumber{#1}%
 		\fi
 		\let\pgfmathfloatscale=\pgfmathresult%
-	},%
+	},%		
 	% determines the output format of each complete expression parsing
 	% process. If 'scale results' is active, 'fixed' is assumed
 	% automatically.
@@ -192,7 +192,7 @@
 	\pgfutil at namelet{#1}{#2}%
 }
 \def\pgfmathfloat at install@unimplemented#1{%
-	\expandafter\pgfmathfloat at prepareuninstallcmd\csname pgfmath@#1@\endcsname%
+	\expandafter\pgfmathfloat at prepareuninstallcmd\csname pgfmath#1@\endcsname%
 	\expandafter\def\csname pgfmath#1@\endcsname##1{\pgfmathfloat at notimplemented{#1}}%
 }
 \def\pgfmathfloat at plots@install{%
@@ -288,6 +288,7 @@
 	\expandafter\pgfmathfloat at install\csname pgfmathatan2@\endcsname=\pgfmathfloatatantwo@
 	\pgfmathfloat at install@unimplemented{isprime}%
 	\pgfmathfloat at install@unimplemented{iseven}%
+	\pgfmathfloat at install@unimplemented{isodd}%
 	\pgfmathfloat at install@unimplemented{gcd}%
 	\pgfmathfloat at install@unimplemented{frac}%
 	\pgfmathfloat at install@unimplemented{random}%
@@ -325,6 +326,7 @@
 	\let\pgfmath at basic@parse at exponent=\pgfmath at parse@exponent%
 	\let\pgfmath at basic@stack at push@operand=\pgfmath at stack@push at operand
 	\pgfmathfloat at install\pgfmath at stack@push at operand=\pgfmathfloat at stack@push at operand
+	\pgfmathfloat at install\pgfmath at parse@operand at quote=\pgfmathfloat at parse@operand at quote
 	\pgfmathfloat at install\pgfmath at parse@exponent=\pgfmathfloat at parse@float at or@exponent
 	%
 	\pgfmathfloat at install\pgfmathparse=\pgfmathfloatparse%
@@ -350,7 +352,7 @@
 		\noexpand\def\expandafter\noexpand\csname pgfmath at parsefunction@#1\endcsname{%
 			\noexpand\let\noexpand\pgfmath at parsepostgroup\expandafter\noexpand\csname pgfmath at parsefunction@#1@\endcsname%
 			\noexpand\expandafter\noexpand\pgfmath at parse@}%
-		\noexpand\def\expandafter\noexpand\csname pgfmath at parsefunction@#1@\endcsname{%
+		\noexpand\def\expandafter\noexpand\csname pgfmath at parsefunction@#1@\endcsname{%	
 			\noexpand\expandafter\expandafter\noexpand\csname pgfmath#1@\endcsname\noexpand\expandafter{\noexpand\pgfmathresult}%
 			\noexpand\pgfmath at postfunction%
 		}%
@@ -510,6 +512,14 @@
 	\pgfmath at parse@@operator%
 }%
 
+\def\pgfmathfloat at parse@operand at quote#1"{%
+  \edef\pgfmathresult{\pgfmath at fpu@stringmarker #1}%
+  \expandafter\pgfmath at basic@stack at push@operand\expandafter{\pgfmathresult}%
+  \pgfmath at parse@@operator%
+}
+
+\def\pgfmath at fpu@stringmarker{@@str@@:}%
+
 % This extends the functionality of the basic level operand stack: it
 % assures every element on the stack is a float.
 \def\pgfmathfloat at stack@push at operand#1{%
@@ -526,10 +536,19 @@
 	\ifpgfutil at in@
 		\pgfmath at basic@stack at push@operand{#1}%
 	\else
-		\pgfmathfloatparsenumber{#1}%
-		\expandafter\pgfmath at basic@stack at push@operand\expandafter{\pgfmathresult}%
+		\expandafter\pgfutil at in@\expandafter{\pgfmath at fpu@stringmarker}{#1}%
+		\ifpgfutil at in@
+			\pgfmathfloat at stack@push at operand@single at str#1\relax
+		\else
+			\pgfmathfloatparsenumber{#1}%
+			\expandafter\pgfmath at basic@stack at push@operand\expandafter{\pgfmathresult}%
+		\fi
 	\fi
 }%
+
+\expandafter\def\expandafter\pgfmathfloat at stack@push at operand@single at str\pgfmath at fpu@stringmarker #1\relax{%
+	\pgfmath at basic@stack at push@operand{#1}%
+}%
 \def\pgfmathfloat at stack@push at operand@GOBBLE#1\relax{}%
 \def\pgfmathfloat at stack@push at operand@list#1{%
 	\expandafter\pgfutil at in@ \pgfmathfloat at POSTFLAGSCHAR{#1}%
@@ -1636,9 +1655,15 @@
 %
 \def\pgfmathfloatmod@#1#2{%
 	\begingroup
-	\pgfmathfloatdivide@{#1}{#2}%
-	\pgfmathfloatint@{\pgfmathresult}%
+	\pgfmathfloattoint{#1}%
 	\let\pgfmathfloat at loc@TMPa=\pgfmathresult
+	\pgfmathfloattoint{#2}%
+	\let\pgfmathfloat at loc@TMPb=\pgfmathresult
+	\c at pgfmath@counta=\pgfmathfloat at loc@TMPa\relax
+	\divide\c at pgfmath@counta by\pgfmathfloat at loc@TMPb\relax
+	\expandafter\pgfmathfloatparsenumber\expandafter{\the\c at pgfmath@counta}%
+	%
+	\let\pgfmathfloat at loc@TMPa=\pgfmathresult
 	\pgfmathfloatmultiply@{\pgfmathfloat at loc@TMPa}{#2}%
 	\let\pgfmathfloat at loc@TMPb=\pgfmathresult
 	\pgfmathfloatsubtract@{#1}{\pgfmathfloat at loc@TMPb}%
@@ -1651,15 +1676,20 @@
 % A modification of \pgfmathfloatmod@ where #3 = 1/#2 is already
 % known. This may be faster.
 \def\pgfmathfloatmodknowsinverse@#1#2#3{%
-	\begingroup
-	\pgfmathfloatmultiply@{#1}{#3}%
-	\pgfmathfloatint@{\pgfmathresult}%
-	\let\pgfmathfloat at loc@TMPa=\pgfmathresult
-	\pgfmathfloatmultiply@{\pgfmathfloat at loc@TMPa}{#2}%
-	\let\pgfmathfloat at loc@TMPb=\pgfmathresult
-	\pgfmathfloatsubtract@{#1}{\pgfmathfloat at loc@TMPb}%
-	\pgfmath at smuggleone\pgfmathresult
-	\endgroup
+	\pgfmathfloatmod@{#1}{#2}%
+	%--------------------------------------------------
+	% \begingroup
+	% % FIXME : is this function correct? \pgfmathfloatmod had a
+	% % rounding flaw...
+	% \pgfmathfloatmultiply@{#1}{#3}%
+	% \pgfmathfloatint@{\pgfmathresult}%
+	% \let\pgfmathfloat at loc@TMPa=\pgfmathresult
+	% \pgfmathfloatmultiply@{\pgfmathfloat at loc@TMPa}{#2}%
+	% \let\pgfmathfloat at loc@TMPb=\pgfmathresult
+	% \pgfmathfloatsubtract@{#1}{\pgfmathfloat at loc@TMPb}%
+	% \pgfmath at smuggleone\pgfmathresult
+	% \endgroup
+	%--------------------------------------------------
 }
 \let\pgfmathfloatmodknowsinverse=\pgfmathfloatmodknowsinverse@
 
@@ -2119,7 +2149,7 @@
 			\ifnum0=\c at pgfmath@counta
 				% ah: 0^0
 				\pgfmathfloatcreate{1}{1.0}{0}%
-			\else
+			\else	
 				% ah: 0^x with x!=0:
 				\pgfmathfloatcreate{0}{0.0}{0}%
 			\fi

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -19,7 +19,7 @@
 % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything:
 % This file comes without any warranty as the rest of pgfplots; there is no obligation for help.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 14. Feb 21:37:39 CET 2014 %%%
+%%% Date of this copy: Di 14. Nov 22:41:45 CET 2017 %%%
 
 
 
@@ -76,7 +76,7 @@
 % Example: \pgfintersectiongetsolutionsegmentindices{0}{\first}{\second}
 %
 % -> \first may be 0 if point #0 is in the 0'th segment
-% -> \second may be 42 if point #0 is in the 42'th segment
+% -> \second may be 42 if point #0 is in the 42'th segment 
 %
 % The "segment index" is actually close to the "time" of the solution.
 % If a solution is at "time" 42.2, it will have segment index 42.
@@ -132,7 +132,7 @@
 			\def\pgf at temp##1##2##3##4{%
 				\edef#2{##3}%
 				\edef#3{##4}%
-				%
+				% 
 				% check for fallback to segment indices:
 				\ifx#2\pgfutil at empty \edef#2{##1}\fi
 				\ifx#3\pgfutil at empty \edef#3{##2}\fi
@@ -147,7 +147,7 @@
 	\begingroup%
 		\pgftransforminvert%
 		\pgfpointorigin%
-		\pgf at pos@transform{\pgf at x}{\pgf at y}%
+		\pgf at pos@transform at glob
 		\global\pgf at x=\pgf at x%
 		\global\pgf at y=\pgf at y%
 	\endgroup%
@@ -161,7 +161,7 @@
 \long\def\pgfintersectionofpaths#1#2{%
 	\begingroup%
 		\pgfinterruptpath%
-		#1%
+		#1% 
 		\pgfgetpath\pgf at intersect@path at a%
 		\global\let\pgf at intersect@path at temp=\pgf at intersect@path at a%
 		\endpgfinterruptpath%
@@ -170,7 +170,7 @@
 	%
 	\begingroup%
 		\pgfinterruptpath%
-		#2%
+		#2% 
 		\pgfgetpath\pgf at intersect@path at b%
 		\global\let\pgf at intersect@path at temp=\pgf at intersect@path at b%
 		\endpgfinterruptpath%
@@ -220,9 +220,9 @@
 	%
 	% However, \pgf at intersect@time at offset and
 	% \pgf at intersect@time at offset@b are *always* valid. In fact,they
-	% resemble a part of the time: it holds
+	% resemble a part of the time: it holds 
 	%   0 <= \pgf at intersect@time at a < 1
-	% and \pgf at intersect@time at offset > 0.
+	% and \pgf at intersect@time at offset > 0. 
 	%
 	% If we have an intersection in segment 42 of path A,
 	% \pgf at intersect@time at offset will be 42. The time inside of that
@@ -377,8 +377,7 @@
 	\pgf at iflinesintersect{#1}{#2}{#3}{#4}%
 	{%
 		\pgfextract at process\pgf at intersect@solution at candidate{%
-			\pgfpointintersectionoflines{\pgfpoint at intersect@start at a}{\pgfpoint at intersect@end at a}%
-				{\pgfpoint at intersect@start at b}{\pgfpoint at intersect@end at b}%
+			% pgf at x and pgf at y are already assigned by \pgf at iflinesintersect
 		}%
 		\pgf at ifsolution@duplicate{\pgf at intersect@solution at candidate}{%
 			% ah - we a duplicate. Apparently, we have a hit on an
@@ -402,7 +401,7 @@
 				\pgf at marshal%
 				\pgfmathdivide@{\pgfmathresult}{\pgf at intersect@length at a}%
 				\pgf at x=\pgfmathresult pt\relax%
-				\advance\pgf at x by\pgf at intersect@time at offset pt\relax%
+				\advance\pgf at x by\pgf at intersect@time at offset pt\relax%		
 				\edef\pgf at intersect@time at a{\pgfmath at tonumber{\pgf at x}}%
 				\expandafter\global\expandafter\let\csname pgf at g@intersect at solution@\the\pgf at intersect@solutions @time at a\endcsname=
 					\pgf at intersect@time at a
@@ -413,7 +412,8 @@
 			\pgf at intersection@store at properties{pgfpoint at g@intersect at solution@\the\pgf at intersect@solutions}%
 		}%
 		%
-	}{}%
+	}{%
+	}%		
 }
 
 % Test if two lines L1 and L2 intersect.
@@ -435,16 +435,16 @@
 %
 % t = |x4-x3  x3-x1| / |x4-x3  x2-x1|
 %     |y4-y3  y3-y1|   |y4-y3  y2-y1|
-%
+% 
 % with 0<=s,t<=1
-%
+%		
 % s and t do not need to be calculated:
 %
 % Let s = A / C and t = B / C
-%
+% 
 % Then 0<=s<=1 if !(C=0) && ((A=0) || ((A>0) && !(C<A)) || ((A<0) && !(C>A)))
 %      0<=t<=1 if !(C=0) && ((B=0) || ((B>0) && !(C<B)) || ((B<0) && !(C>B)))
-%
+% 
 \newif\ifpgf at s
 \newif\ifpgf at t
 \def\pgfiflinesintersect#1#2#3#4{%
@@ -454,95 +454,199 @@
 	\endgroup%
 }
 
+% queried by pgfplots. Do not delete, only increase.
+\def\pgf at intersections@version{2}%
+
+% #1,#2: line 1
+% #3,#4: line 2
 \def\pgf at iflinesintersect#1#2#3#4{%
-	#4\relax%
+	% first: check bounding boxes -- but somewhat increased such that we do not
+	% exclude "visible" hits due to rounding issues (i.e. use an upper bound):
+	\pgf at intersect@boundingbox at reset%
+	\pgf at intersect@boundingbox at update{#1}%
+	\pgf at intersect@boundingbox at update{#2}%
+	\pgf at intersect@boundingbox at assign@b%
+	%
+	\pgf at intersect@boundingbox at reset%
+	\pgf at intersect@boundingbox at update{#3}%
+	\pgf at intersect@boundingbox at update{#4}%
+	\pgf at intersect@boundingbox at assign@a%
+	%
+	\pgf at intersect@boundingbox at a%
+	\pgf at intersect@boundingbox at b%
+	%
+	\pgf at intersect@boundingbox at ifoverlap@upperbound{%
+		\pgf at iflinesintersect@{#1}{#2}{#3}{#4}%
+	}{%
+		\let\pgf at intersect@next=\pgfutil at secondoftwo%
+	}%
+	\pgf at intersect@next%
+}%
+
+% a helper routine which simply defines \pgf at intersect@next.
+% 
+% In principle, this routine is capable of computing the entire intersection... but we only invoke it after checking for bounding box overlaps. This has two reasons:
+%   1. robustness. almost-parallel lines could cause "dimension too large" when solving the linear equation system
+% 		XXX : I still needed to replace the linear solver by one using the FPU. Perhaps I do not need the BB check anymore?
+%   2. performance. I hope it is faster to first check for BB (but this is not sure in TeX)
+%
+% #1,#2: line 1
+% #3,#4: line 2
+\def\pgf at iflinesintersect@#1#2#3#4{%
+	% we have two lines of sorts
+	% l_1(s) := #1 + s * (#2 - #1),  0<= s <= 1
+	% and
+	% l_2(t) := #3 + t * (#4 - #3),  0<= t <= 1
+	% ->
+	% set up LGS
+	% ( #2 - #1 ) *s + (#3-#4) * t = #3-#1
+	% we have a hit if 0<= s,t <= 1 .
+	#1\relax%
+	\pgf at xa=\pgf at x%
+	\pgf at ya=\pgf at y%
+	#2\relax%
+	\pgf at xb=\pgf at x%
+	\pgf at yb=\pgf at y%
+	#3\relax%
 	\pgf at xc=\pgf at x%
 	\pgf at yc=\pgf at y%
-	#3\relax%
-	\advance\pgf at xc by-\pgf at x%
-	\advance\pgf at yc by-\pgf at y%
-	\pgf at xb=\pgf at x%
-	\pgf at yb=\pgf at y%
-	#2\relax%
-	\pgf at xa=\pgf at x%
-	\pgf at ya=\pgf at y%
-	#1\relax%
-	\advance\pgf at xa by-\pgf at x%
-	\advance\pgf at ya by-\pgf at y%
-	\advance\pgf at xb by-\pgf at x%
-	\advance\pgf at yb by-\pgf at y%
+	#4\relax%
 	%
-	% xc = x4-x3; yc=y4-y3;
-	% xb = x3-x1; yb=y3-y1;
-	% xa = x2-x1; ya=y2-y1;
+	% will be overwritten, remember it:
+	\edef\pgf at intersect@A{%
+		\pgf at xa=\the\pgf at xa\space
+		\pgf at ya=\the\pgf at ya\space
+	}%
 	%
+	% B := (2-1)
+	\advance\pgf at xb by-\pgf at xa
+	\advance\pgf at yb by-\pgf at ya
 	%
-	% Normalise a little. 16384 may not be a robust choice.
+	% A := (3-1)
+	\advance\pgf at xa by-\pgf at xc
+	\advance\pgf at ya by-\pgf at yc
+	\pgf at xa=-\pgf at xa
+	\pgf at ya=-\pgf at ya
 	%
-	\c at pgf@counta=\pgf at xa\divide\c at pgf@counta by16384\relax%
-	\c at pgf@countb=\pgf at xb\divide\c at pgf@countb by16384\relax%
-	\c at pgf@countc=\pgf at ya\divide\c at pgf@countc by16384\relax%
-	\c at pgf@countd=\pgf at yb\divide\c at pgf@countd by16384\relax%
-	\multiply\c at pgf@counta by\c at pgf@countd%
-	\multiply\c at pgf@countc by\c at pgf@countb%
-	\advance\c at pgf@counta by-\c at pgf@countc%
-	\pgfutil at tempcnta=\c at pgf@counta%
+	% C := (3-4)
+	\advance\pgf at xc by-\pgf at x
+	\advance\pgf at yc by-\pgf at y
 	%
-	\c at pgf@counta=\pgf at xc\divide\c at pgf@counta by16384\relax%
-	\c at pgf@countc=\pgf at yc\divide\c at pgf@countc by16384\relax%
-	\multiply\c at pgf@countd by\c at pgf@counta%
-	\multiply\c at pgf@countb by\c at pgf@countc%
-	\advance\c at pgf@countd by-\c at pgf@countb%
-	\pgfutil at tempcntb=\c at pgf@countd%
+	\begingroup
+	% compute the |.|_1 norm of each of lines. We need to compute
+	% tolerance factors in order to decide if we have an intersection.
+	% line 1: compute |#2 - #1|_1 :
+	\ifdim\pgf at xb<0sp \pgf at xb=-\pgf at xb\fi
+	\ifdim\pgf at yb<0sp \pgf at yb=-\pgf at yb\fi
+	\advance\pgf at xb by\pgf at yb
+	\xdef\pgf at intersect@len at a{\pgf at sys@tonumber\pgf at xb}%
 	%
-	\c at pgf@countb=\pgf at xa\divide\c at pgf@countb by16384\relax%
-	\c at pgf@countd=\pgf at ya\divide\c at pgf@countd by16384\relax%
-	\multiply\c at pgf@counta by\c at pgf@countd%
-	\multiply\c at pgf@countc by\c at pgf@countb%
-	\advance\c at pgf@counta by-\c at pgf@countc%
+	% line 2: compute |#3 - #4|_1 :
+	\ifdim\pgf at xc<0sp \pgf at xc=-\pgf at xc\fi
+	\ifdim\pgf at yc<0sp \pgf at yc=-\pgf at yc\fi
+	\advance\pgf at xc by\pgf at yc
+	\xdef\pgf at intersect@len at b{\pgf at sys@tonumber\pgf at xc}%
+	\endgroup
 	%
-	\pgf at sfalse%
-	\pgf at tfalse%
-	\ifnum\c at pgf@counta=0\relax%
-	\else%
-		\ifnum\pgfutil at tempcnta=0\relax%
-			\pgf at strue%
-		\else%
-			\ifnum\pgfutil at tempcnta>0\relax%
-				\ifnum\c at pgf@counta<\pgfutil at tempcnta%
-				\else%
-					\pgf at strue%
-				\fi%
-			\else%
-				\ifnum\c at pgf@counta>\pgfutil at tempcnta%
-				\else%
-					\pgf at strue%
-				\fi%
-			\fi%
-		\fi%
-		\ifnum\pgfutil at tempcntb=0\relax%
-			\pgf at ttrue%
-		\else%
-			\ifnum\pgfutil at tempcntb>0\relax%
-				\ifnum\c at pgf@counta<\pgfutil at tempcntb%
-				\else%
-					\pgf at ttrue%
-				\fi%
-			\else%
-				\ifnum\c at pgf@counta>\pgfutil at tempcntb%
-				\else%
-					\pgf at ttrue%
-				\fi%
-			\fi%
-		\fi%
-	\fi%
+	\edef\pgf at marshal{%
+		\noexpand\pgfutilsolvetwotwoleqfloat{%
+			{\pgf at sys@tonumber\pgf at xb}{\pgf at sys@tonumber\pgf at xc}%
+			{\pgf at sys@tonumber\pgf at yb}{\pgf at sys@tonumber\pgf at yc}%
+		}{%
+			{\pgf at sys@tonumber\pgf at xa}%
+			{\pgf at sys@tonumber\pgf at ya}%
+		}%
+	}%
+	\pgf at marshal
+	%
 	\let\pgf at intersect@next=\pgfutil at secondoftwo%
-	\ifpgf at s%
-		\ifpgf at t%
+	\ifx\pgfmathresult\pgfutil at empty
+		% matrix was singular.
+	\else
+		\def\pgf at marshal##1##2{%
+			\global\pgf at x=##1pt %
+			\global\pgf at y=##2pt %
+		}%
+		\expandafter\pgf at marshal\pgfmathresult
+		%
+		\def\pgf at marshal{XXXX}% this should never be read
+		% FIRST: check line 1:
+		\ifdim\pgf at x<0sp
+			% let it count as hit if
+			%  || l_1(s) - l_1(0) || < eps
+			% <=>  |s| * ||#2 - #1|| < eps
+			% and, since s< 0  here:
+			% <=>  -s * ||#2 - #1|| < eps
+			\pgf at xa=-\pgf at intersect@len at a\pgf at x
+			\ifdim\pgf at xa<\pgfintersectiontolerance\relax
+				% close enough to first endpoint of line 1:
+				\def\pgf at marshal{1}%
+			\else
+				\def\pgf at marshal{0}%
+			\fi
+		\else
+			\ifdim\pgf at x>1pt
+				% let it count as hit if
+				%  || l_1(s) - l_1(1) || < eps
+				% <=>  |s-1| * ||#2 - #1|| < eps
+				% and, since s > 1  here:
+				% <=>  s * ||#2 - #1|| - ||#2 - #1|| < eps
+				\pgf at xa=\pgf at intersect@len at a\pgf at x
+				\advance\pgf at xa by-\pgf at intersect@len at a pt %
+				\ifdim\pgf at xa<\pgfintersectiontolerance\relax
+					% close enough to second endpoint of line 1:
+					\def\pgf at marshal{1}%
+				\else
+					\def\pgf at marshal{0}%
+				\fi
+			\else
+				% 0<= s <= 1: we have an intersection within line 1.
+				\def\pgf at marshal{1}%
+			\fi
+		\fi
+		%
+		% SECOND: check line 2:
+		\if1\pgf at marshal
+			\ifdim\pgf at y<0sp
+				% see remarks for line 1. same applies here.
+				\pgf at xa=-\pgf at intersect@len at b\pgf at y
+				\ifdim\pgf at xa<\pgfintersectiontolerance\relax
+					% close enough to first endpoint of line 2:
+					\def\pgf at marshal{1}%
+				\else
+					\def\pgf at marshal{0}%
+				\fi
+			\else
+				\ifdim\pgf at y>1pt
+					% see remarks for line 1. same applies here.
+					\pgf at xa=\pgf at intersect@len at b\pgf at y
+					\advance\pgf at xa by-\pgf at intersect@len at b pt %
+					\ifdim\pgf at xa<\pgfintersectiontolerance\relax
+						% close enough to second endpoint of line 2:
+						\def\pgf at marshal{1}%
+					\else
+						\def\pgf at marshal{0}%
+					\fi
+				\else
+					% 0<= t <= 1: we have an intersection within line 2.
+					\def\pgf at marshal{1}%
+				\fi
+			\fi
+		\fi
+		%
+		\if1\pgf at marshal
+			% Ok, compute the intersection point and return it:
+			% we use (x,y) = A + s * (B-A)
+			% keep in mind that (s,t) == (\pgf at x,\pgf at y)
+			\pgf at intersect@A
+			\pgf at yc=\pgf at x
+			\global\pgf at x=\pgf at sys@tonumber\pgf at xb\pgf at yc
+			\global\pgf at y=\pgf at sys@tonumber\pgf at yb\pgf at yc
+			\global\advance\pgf at x by \pgf at xa
+			\global\advance\pgf at y by \pgf at ya
 			\let\pgf at intersect@next=\pgfutil at firstoftwo%
-		\fi%
-	\fi%
-	\pgf at intersect@next%
+		\fi
+	\fi
 }
 
 
@@ -601,17 +705,18 @@
 
 
 \def\pgfintersectiontolerance{0.1pt}
+\def\pgfintersectiontoleranceupperbound{1pt}
 \def\pgfintersectiontolerancefactor{0.1}
 
 
 
 % Find the intersections of two bezier curves.
-%
+% 
 % #1 - #4 = curve 1.
 % #5 - #8 = curve 2.
 % #9      = the solution number.
 %
-% There is no guarantee of ordering of solutions. If there are
+% There is no guarantee of ordering of solutions. If there are 
 % no solutions, the origin is returned.
 %
 \def\pgfpointintersectionofcurves#1#2#3#4#5#6#7#8#9{%
@@ -625,7 +730,7 @@
 % Return any intersection points of two curves C1 and C2.
 % No order can be guaranteed for the solutions.
 %
-% #1, #2, #3, #4 - the points on C1
+% #1, #2, #3, #4 - the points on C1 
 % #5, #6, #7, #8 - the points on C2
 %
 % Returns:
@@ -639,7 +744,7 @@
 %		S = {};
 %	  intersection'(C1,C2);
 %		return S;
-%
+%		
 %	intersection'(C1,C2)
 %		B1 = boundingbox(C1);
 %		B2 = boundingbox(C2);
@@ -677,6 +782,88 @@
 	\endgroup%
 }
 
+\def\pgf at intersect@boundingbox at assign@a{%
+	\edef\pgf at intersect@boundingbox at a{%
+		% lower left:
+		\noexpand\pgf at xb=\the\pgf at xa\space%
+		\noexpand\pgf at yb=\the\pgf at ya\space%
+		% upper right:
+		\noexpand\pgf at xc=\the\pgf at xb\space%
+		\noexpand\pgf at yc=\the\pgf at yb\space%
+	}%	
+}
+\def\pgf at intersect@boundingbox at assign@b{%
+	\edef\pgf at intersect@boundingbox at b{%
+		% lower left:
+		\noexpand\global\noexpand\pgf at x=\the\pgf at xa\space% 
+		\noexpand\global\noexpand\pgf at y=\the\pgf at ya\space%
+		% upper right:
+		\noexpand\pgf at xa=\the\pgf at xb\space%
+		\noexpand\pgf at ya=\the\pgf at yb\space%
+	}%
+}
+
+% see \pgf at intersect@boundingbox at assign@a and \pgf at intersect@boundingbox at assign@b for the naming conventions
+\def\pgf at intersect@boundingbox at ifoverlap{%
+	\def\pgf at intersect@next{\pgfutil at secondoftwo}%
+	%
+	\ifdim\pgf at xa<\pgf at xb%
+	\else%
+		\ifdim\pgf at x>\pgf at xc%
+		\else%
+			\ifdim\pgf at ya<\pgf at yb%
+			\else%
+				\ifdim\pgf at y>\pgf at yc%
+				\else%
+					\def\pgf at intersect@next{\pgfutil at firstoftwo}%
+				\fi
+			\fi
+		\fi
+	\fi
+	\pgf at intersect@next
+}%
+\def\pgf at intersect@boundingbox at ifoverlap@upperbound{%
+	\begingroup
+	\def\pgf at intersect@next{\pgfutil at secondoftwo}%
+	%
+	\advance\pgf at xa by+\pgfintersectiontolerance\relax
+	\ifdim\pgf at xa<\pgf at xb%
+	\else%
+		\global\advance\pgf at x by-\pgfintersectiontolerance\relax
+		\ifdim\pgf at x>\pgf at xc%
+		\else%
+			\advance\pgf at ya by\pgfintersectiontolerance\relax
+			\ifdim\pgf at ya<\pgf at yb%
+			\else%
+				\global\advance\pgf at y by-\pgfintersectiontolerance\relax
+				\ifdim\pgf at y>\pgf at yc%
+				\else%
+					\def\pgf at intersect@next{\pgfutil at firstoftwo}%
+				\fi
+			\fi
+		\fi
+	\fi
+	\expandafter
+	\endgroup
+	\pgf at intersect@next
+}%
+\def\pgf at intersect@boundingbox at ifoverlap@UNUSED{%
+	\let\pgf at intersect@next=\pgfutil at secondoftwo%
+	\ifdim\pgf at xa<\pgf at xb%
+	\else%
+		\ifdim\pgf at x>\pgf at xc%
+		\else%
+			\ifdim\pgf at ya<\pgf at yb%
+			\else%
+				\ifdim\pgf at y>\pgf at yc%
+				\else%
+					\let\pgf at intersect@next=\pgfutil at firstoftwo%
+				\fi
+			\fi
+		\fi
+	\fi
+	\pgf at intersect@next
+}%
 \def\pgf@@intersectionofcurves#1#2#3#4#5#6#7#8{%
 	\pgf at intersect@boundingbox at reset%
 	\pgf at intersect@boundingbox at update{#1}%
@@ -683,36 +870,26 @@
 	\pgf at intersect@boundingbox at update{#2}%
 	\pgf at intersect@boundingbox at update{#3}%
 	\pgf at intersect@boundingbox at update{#4}%
-	% (\pgf at xa, \pgf at ya) is lower-left
-	% (\pgf at xb, \pgf at yb) is upper-right
-	\edef\pgf at intersect@boundingbox at b{%
-		\noexpand\pgf at x=\the\pgf at xa%
-		\noexpand\pgf at y=\the\pgf at ya%
-		\noexpand\pgf at xa=\the\pgf at xb%
-		\noexpand\pgf at ya=\the\pgf at yb%
-	}%
+	\pgf at intersect@boundingbox at assign@b%
+	%
 	\pgf at intersect@boundingbox at reset%
 	\pgf at intersect@boundingbox at update{#5}%
 	\pgf at intersect@boundingbox at update{#6}%
 	\pgf at intersect@boundingbox at update{#7}%
 	\pgf at intersect@boundingbox at update{#8}%
-	\edef\pgf at intersect@boundingbox at a{%
-		\noexpand\pgf at xb=\the\pgf at xa%
-		\noexpand\pgf at yb=\the\pgf at ya%
-		\noexpand\pgf at xc=\the\pgf at xb%
-		\noexpand\pgf at yc=\the\pgf at yb%
-	}%
+	\pgf at intersect@boundingbox at assign@a%
+	%
 	\pgf at intersect@boundingbox at a%
 	\pgf at intersect@boundingbox at b%
-	% check if the two bounding boxes overlap:
-	\ifdim\pgf at xa<\pgf at xb%
-	\else%
-		\ifdim\pgf at x>\pgf at xc%
-		\else%
-			\ifdim\pgf at ya<\pgf at yb%
-			\else%
-				\ifdim\pgf at y>\pgf at yc%
-				\else%
+	%
+	\pgf at intersect@boundingbox at ifoverlap{%
+		\pgf@@@intersectionofcurves{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
+	}{%
+		% no overlap -- no intersection.
+	}%
+}
+
+\def\pgf@@@intersectionofcurves#1#2#3#4#5#6#7#8{%
 					% compute DIFFERENCE vectors:
 					\advance\pgf at xc by-\pgf at xb%
 					\advance\pgf at yc by-\pgf at yb%
@@ -761,8 +938,8 @@
 												\pgf at intersect@solution at candidate%
 										\ifpgf at intersect@sort%
 											\expandafter\xdef%
-											\csname pgf at g@intersect at solution@\the\pgf at intersect@solutions @time at a\endcsname%
-												{\pgf at intersect@time at a}%
+											\csname pgf at g@intersect at solution@\the\pgf at intersect@solutions @time at a\endcsname%	
+												{\pgf at intersect@time at a}%						
 										\fi%
 										\endgroup
 									}%
@@ -774,10 +951,6 @@
 					\else%
 						\pgf at intersect@subdivide at curve{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
 					\fi%
-				\fi%
-			\fi%
-		\fi%
-	\fi%
 }
 
 \def\pgf at intersect@subdivide at curve@b#1#2#3#4#5#6#7#8{%
@@ -855,7 +1028,7 @@
 
 \def\pgf at curve@subdivide at left#1#2#3#4{%
 	%
-	% The left curve (from t=0 to t=.5)
+	% The left curve (from t=0 to t=.5) 
 	%
 	\begingroup
 	#1\relax%
@@ -898,7 +1071,7 @@
 
 \def\pgf at curve@subdivide at right#1#2#3#4{%
 	%
-	% The right curve (from t=0.5 to t=1)
+	% The right curve (from t=0.5 to t=1) 
 	%
 	\begingroup
 	#1\relax%
@@ -942,7 +1115,7 @@
 
 
 % A solution S1 is considered a duplicate of S2, if
-%
+% 
 % |x1 - x2|f < q and |y1 - y2|f < q
 %
 % where q is a small value (tolerance).
@@ -956,7 +1129,7 @@
 	\let\pgf at intersect@next=\pgfutil at secondoftwo%
 	\pgfmathloop%
 		\ifnum\pgfmathcounter>\pgf at intersect@solutions\relax%
-		\else%
+		\else%			
 			\pgf at ifsolution@duplicate@{\pgfmathcounter}%
 	\repeatpgfmathloop%
 	\pgf at intersect@next%
@@ -985,8 +1158,7 @@
 \def\pgfintersectionsolutionsortbytime{%
 	\pgf at intersect@solutions at sortfinishtrue%
 	\pgfmathloop%
-		\ifnum\pgfmathcounter=\pgfintersectionsolutions\relax%
-		\else%
+		\ifnum\pgfmathcounter<\pgfintersectionsolutions\relax%
 			\pgfutil at tempcnta=\pgfmathcounter%
 			\advance\pgfutil at tempcnta by1\relax%
 			\ifdim\csname pgf at intersect@solution@\pgfmathcounter @time at a\endcsname pt>%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -19,7 +19,7 @@
 % with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything:
 % This file comes without any warranty as the rest of pgfplots; there is no obligation for help.
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Di 30. Dez 15:31:24 CET 2014 %%%
+%%% Date of this copy: Fr 10. Nov 17:18:26 CET 2017 %%%
 
 
 
@@ -1691,8 +1691,8 @@
 	\endgroup
 	\let#3=\pgfmathfloat at glob@TMP
 }%
+	
 
-
 % Changes the current number pretty printer to #1.
 %
 % #1 is the macro base name for the pretty print routine, without the
@@ -1858,7 +1858,7 @@
 		\fi
 	\fi
 }
-
+			
 % takes the current input and decides whether trailing zeros shall be
 % discarded or more zeros need to be filled in.
 \def\pgfmathroundto at impl@finish at with@truncation{%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfcontrib/pgflibraryfillbetween.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfcontrib/pgflibraryfillbetween.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfcontrib/pgflibraryfillbetween.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -9,6 +9,12 @@
 
 
 \usepgflibrary{intersections}
+
+\pgfutil at IfUndefined{pgf at intersections@version}{%
+	\input pgfplotsoldpgfsupp_pgflibraryintersections.code.tex
+}{%
+}%
+
 % FIXME : ARCHITECTURE VIOLATION:  REQUIRES
 % \usetikzlibrary{decorations.softclip}
 %
@@ -61,6 +67,12 @@
 	%
 	% 'end' has no arguments.
 	/pgf/fill between/result stream/end/.code=,%
+	%
+	/pgf/fill between/omit empty segments/.is choice,
+	/pgf/fill between/omit empty segments/.default=true,
+	/pgf/fill between/omit empty segments/false/.code=\def\pgfpathfillbetween at omit@empty at segments{0},%
+	/pgf/fill between/omit empty segments/true/.code=\def\pgfpathfillbetween at omit@empty at segments{1},%
+	/pgf/fill between/omit empty segments/true,
 }%
 
 % \pgfpathfillbetween[<options>]{<first path>}{<second path>}
@@ -104,10 +116,18 @@
 	\pgfpathcomputesoftclippath{#3}{\pgfpathfillbetween at softclip@B}\let#3=\pgfretval%
 	%
 	\ifx#2\pgfutil at empty
-		\pgfpathfillbetween at warning{first}%
+		\ifx\pgfpathfillbetween at softclip@A\pgfutil at empty
+			\pgfpathfillbetween at warning{first}%
+		\else
+			\pgfpathfillbetween at warning{soft-clipped first}%
+		\fi
 	\else
 		\ifx#3\pgfutil at empty
-			\pgfpathfillbetween at warning{second}%
+			\ifx\pgfpathfillbetween at softclip@B\pgfutil at empty
+				\pgfpathfillbetween at warning{second}%
+			\else
+				\pgfpathfillbetween at warning{soft-clipped second}%
+			\fi
 		\else
 			%
 			\ifpgfpathfillbetween at split
@@ -282,9 +302,10 @@
 		\pgferror{Illegal internal state encountered: the number segments induced by the intersection points of the two paths DIFFER between the first and the second path: first path has \pgfpathfilled at a@segments\space whereas the second has \pgfpathfilled at b@segments.}%
 	\fi
 	%
-	\pgfkeys{/pgf/fill between/result stream/begin=\pgfpathfilled at a@segments}%
-	% Recombine the pairs of segments (a_i, b_i), i = 0,..., N-1 in a
-	% filled way:
+	% STEP 1: find out if there are empty segments. Numerical
+	% inaccuracies occasionally result in such segments; we silently
+	% skip them.
+	\def\c at pgfpathfilled@nonemptysegments{0}%
 	\def\c at pgfpathfilled@counter{0}%
 	\pgfmathloop
 	\ifnum\c at pgfpathfilled@counter<\pgfpathfilled at a@segments\relax
@@ -291,15 +312,71 @@
 		\expandafter\let\expandafter\pgf at loc@path at a\csname pgf at intersect@path at split@a@\c at pgfpathfilled@counter\endcsname
 		\expandafter\let\expandafter\pgf at loc@path at b\csname pgf at intersect@path at split@b@\c at pgfpathfilled@counter\endcsname
 		%
-		\pgfpathfillbetween at compute{\pgf at loc@path at a}{\pgf at loc@path at b}%
-		% report to the result stream. It knows how to deal with it:
-		\pgfpathfillbetween at invoke{result stream/next ready}%
+		\if1\pgfpathfillbetween at omit@empty at segments
+			\pgfpathfillbetween at compute@checkempty{\pgf at loc@path at a}%
+			% A segment is empty if BOTH of its input segments are empty:
+			\if1\pgfretval
+				\pgfpathfillbetween at compute@checkempty{\pgf at loc@path at b}%
+				\if1\pgfretval
+					\pgfutil at IfUndefined{pgfplots at log}{}{%
+						\pgfplots at log4{fillbetween: skipping empty intersection segment no \c at pgfpathfilled@counter}%
+					}%
+					\expandafter\def\csname pgf at interset@path at empty@\c at pgfpathfilled@counter\endcsname{1}%
+				\else
+					\expandafter\def\csname pgf at interset@path at empty@\c at pgfpathfilled@counter\endcsname{0}%
+					\pgfutil at advancestringcounter\c at pgfpathfilled@nonemptysegments
+				\fi
+			\else
+				\expandafter\def\csname pgf at interset@path at empty@\c at pgfpathfilled@counter\endcsname{0}%
+				\pgfutil at advancestringcounter\c at pgfpathfilled@nonemptysegments
+			\fi
+		\else
+			\expandafter\def\csname pgf at interset@path at empty@\c at pgfpathfilled@counter\endcsname{0}%
+			\pgfutil at advancestringcounter\c at pgfpathfilled@nonemptysegments
+		\fi
 		%
 		\pgfutil at advancestringcounter\c at pgfpathfilled@counter
 	\repeatpgfmathloop
-	\pgfpathfillbetween at invoke{result stream/end}%
+	%
+	\ifnum\c at pgfpathfilled@nonemptysegments=0
+	\else
+		\pgfkeys{/pgf/fill between/result stream/begin=\c at pgfpathfilled@nonemptysegments}%
+		% Recombine the pairs of segments (a_i, b_i), i = 0,..., N-1 in a
+		% filled way:
+		\def\c at pgfpathfilled@counter{0}%
+		\pgfmathloop
+		\ifnum\c at pgfpathfilled@counter<\pgfpathfilled at a@segments\relax
+			\if0\csname pgf at interset@path at empty@\c at pgfpathfilled@counter\endcsname
+				\expandafter\let\expandafter\pgf at loc@path at a\csname pgf at intersect@path at split@a@\c at pgfpathfilled@counter\endcsname
+				\expandafter\let\expandafter\pgf at loc@path at b\csname pgf at intersect@path at split@b@\c at pgfpathfilled@counter\endcsname
+				%
+				\pgfpathfillbetween at compute{\pgf at loc@path at a}{\pgf at loc@path at b}%
+				% report to the result stream. It knows how to deal with it:
+				\pgfpathfillbetween at invoke{result stream/next ready}%
+				%
+			\fi
+			\pgfutil at advancestringcounter\c at pgfpathfilled@counter
+		\repeatpgfmathloop
+		\pgfpathfillbetween at invoke{result stream/end}%
+	\fi
 }
 
+\def\pgflibraryfillbetweenemptysegmenttolerance{1pt}
+
+\def\pgfpathfillbetween at compute@checkempty#1{%
+	\def\pgfretval{0}%
+	\pgf at compute@BB{#1}%
+	\advance\pgf at xb by-\pgf at xa
+	\advance\pgf at yb by-\pgf at ya
+	% if one of the dimensions is empty, the segment is empty:
+	\ifdim\pgf at xb<\pgflibraryfillbetweenemptysegmenttolerance\relax
+		\def\pgfretval{1}%
+	\fi
+	\ifdim\pgf at yb<\pgflibraryfillbetweenemptysegmenttolerance\relax
+		\def\pgfretval{1}%
+	\fi
+}
+
 \def\pgfpathfillbetween at compute#1#2{%
 %\message{Combination of ^^J  \meaning#1\space and ^^J \meaning#2...^^J}%
 	%
@@ -370,6 +447,37 @@
 	\def\pgfretval{{#2}{#3}}%
 }%
 
+% assigns the bounding box of path #1 to 
+% (pgf at xa , pgf at ya) = (minx,miny)
+% (pgf at xb , pgf at yb) = (maxx,maxy)
+\def\pgf at compute@BB#1{%
+	\begingroup
+	\dimendef\pgf at pathmaxx=0 %
+	\dimendef\pgf at pathminx=1 %
+	\dimendef\pgf at pathmaxy=2 %
+	\dimendef\pgf at pathminy=3 %
+	\pgf at pathmaxx=-16000pt\relax%
+	\pgf at pathminx=16000pt\relax%
+	\pgf at pathmaxy=-16000pt\relax%
+	\pgf at pathminy=16000pt\relax%
+	\let\pgf at protocolsizes=\pgf at compute@BB at protocol@sizes
+	\expandafter\pgfsetpath at loop#1\pgf at stop
+	\xdef\pgf at marshal{%
+		\pgf at xa=\the\pgf at pathminx\relax
+		\pgf at ya=\the\pgf at pathminy\relax
+		\pgf at xb=\the\pgf at pathmaxx\relax
+		\pgf at yb=\the\pgf at pathmaxy\relax
+	}%
+	\endgroup
+	\pgf at marshal
+}%
+\def\pgf at compute@BB at protocol@sizes#1#2{%
+  \ifdim#1<\pgf at pathminx\pgf at pathminx#1\fi%
+  \ifdim#1>\pgf at pathmaxx\pgf at pathmaxx#1\fi%
+  \ifdim#2<\pgf at pathminy\pgf at pathminy#2\fi%
+  \ifdim#2>\pgf at pathmaxy\pgf at pathmaxy#2\fi%
+}
+
 % A utility function like \pgfsetpath which calls \pgfsetpath *and* protocols
 % the size of each path segment (i.e. compute the bounding box).
 %

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -2212,6 +2212,9 @@
 	/pgfplots/x filter/.expression/.code=\pgfplots at install@filter at expression{x filter}{#1},
 	/pgfplots/y filter/.expression/.code=\pgfplots at install@filter at expression{y filter}{#1},
 	/pgfplots/z filter/.expression/.code=\pgfplots at install@filter at expression{z filter}{#1},
+	/pgfplots/x filter/.append expression/.code=\pgfplots at install@filter at expression@append{x filter}{#1},
+	/pgfplots/y filter/.append expression/.code=\pgfplots at install@filter at expression@append{y filter}{#1},
+	/pgfplots/z filter/.append expression/.code=\pgfplots at install@filter at expression@append{z filter}{#1},
 	/pgfplots/restrict x to domain/.style={/pgfplots/@restrict to domain={x}{}{#1}{0}},%
 	/pgfplots/restrict y to domain/.style={/pgfplots/@restrict to domain={y}{}{#1}{0}},%
 	/pgfplots/restrict z to domain/.style={/pgfplots/@restrict to domain={z}{}{#1}{0}},%
@@ -4333,6 +4336,7 @@
 	/pgfplots/compat/anchors/1.13/.style= 	{/pgfplots/compat/anchors/1.3,/pgfplots/correct polar positioning=true},%
 	/pgfplots/compat/anchors/1.14/.style= 	{/pgfplots/compat/anchors/1.13},%
 	/pgfplots/compat/anchors/1.15/.style= 	{/pgfplots/compat/anchors/1.13},%
+	/pgfplots/compat/anchors/1.16/.style= 	{/pgfplots/compat/anchors/1.13},%
 	/pgfplots/compat/anchors/default/.style={/pgfplots/compat/anchors/1.3},%
 	%
 	/pgfplots/compat/empty line/.is choice,
@@ -4351,6 +4355,7 @@
 	/pgfplots/compat/empty line/1.13/.style= 	{/pgfplots/compat/empty line/1.4},%
 	/pgfplots/compat/empty line/1.14/.style= 	{/pgfplots/compat/empty line/1.4},%
 	/pgfplots/compat/empty line/1.15/.style= 	{/pgfplots/compat/empty line/1.4},%
+	/pgfplots/compat/empty line/1.16/.style= 	{/pgfplots/compat/empty line/1.4},%
 	/pgfplots/compat/empty line/default/.style=	{/pgfplots/compat/empty line/1.4},%
 	%
 	/pgfplots/compat/path replacement/.is choice,
@@ -4369,6 +4374,7 @@
 	/pgfplots/compat/path replacement/1.13/.style=   	{/pgfplots/compat/path replacement/1.5.1},
 	/pgfplots/compat/path replacement/1.14/.style=   	{/pgfplots/compat/path replacement/1.5.1},
 	/pgfplots/compat/path replacement/1.15/.style=   	{/pgfplots/compat/path replacement/1.5.1},
+	/pgfplots/compat/path replacement/1.16/.style=   	{/pgfplots/compat/path replacement/1.5.1},
 	/pgfplots/compat/path replacement/default/.style=	{/pgfplots/compat/path replacement/pre 1.3},%
 	%
 	/pgfplots/compat/pgfpoint substitution/.is choice,
@@ -4387,6 +4393,7 @@
 	/pgfplots/compat/pgfpoint substitution/1.13/.style=   	{/pgfplots/compat/pgfpoint substitution/1.11},
 	/pgfplots/compat/pgfpoint substitution/1.14/.style=   	{/pgfplots/compat/pgfpoint substitution/1.11},
 	/pgfplots/compat/pgfpoint substitution/1.15/.style=   	{/pgfplots/compat/pgfpoint substitution/1.11},
+	/pgfplots/compat/pgfpoint substitution/1.16/.style=   	{/pgfplots/compat/pgfpoint substitution/1.11},
 	/pgfplots/compat/pgfpoint substitution/default/.style=	{/pgfplots/compat/pgfpoint substitution/pre 1.3},%
 	%ellipse/.is if=pgfplots at path@replace at ellipse,
 	%
@@ -4415,6 +4422,7 @@
 	/pgfplots/compat/labels/1.13/.style=		{/pgfplots/compat/labels/1.8},%
 	/pgfplots/compat/labels/1.14/.style=		{/pgfplots/compat/labels/1.8},%
 	/pgfplots/compat/labels/1.15/.style=		{/pgfplots/compat/labels/1.8},%
+	/pgfplots/compat/labels/1.16/.style=		{/pgfplots/compat/labels/1.8},%
 	/pgfplots/compat/labels/default/.style=	{/pgfplots/compat/labels/pre 1.3},% maintain backwards compatibility
 	%
 	/pgfplots/compat/bar nodes/.is choice,
@@ -4468,6 +4476,7 @@
 	},%
 	/pgfplots/compat/bar nodes/1.14/.style=		{/pgfplots/compat/bar nodes/1.13},%
 	/pgfplots/compat/bar nodes/1.15/.style=		{/pgfplots/compat/bar nodes/1.13},%
+	/pgfplots/compat/bar nodes/1.16/.style=		{/pgfplots/compat/bar nodes/1.13},%
 	/pgfplots/compat/bar nodes/default/.style=	{/pgfplots/compat/bar nodes/pre 1.3},% maintain backwards compatibility
 	/pgfplots/compat/bar nodes/default,
 	%
@@ -4501,6 +4510,7 @@
 	/pgfplots/compat/scaling/1.13/.style={/pgfplots/compat/scaling/1.6},
 	/pgfplots/compat/scaling/1.14/.style={/pgfplots/compat/scaling/1.6},
 	/pgfplots/compat/scaling/1.15/.style={/pgfplots/compat/scaling/1.6},
+	/pgfplots/compat/scaling/1.16/.style={/pgfplots/compat/scaling/1.6},
 	/pgfplots/compat/scaling/default/.style={/pgfplots/compat/scaling/1.4},
 	%
 	/pgfplots/compat/scale mode/.is choice,
@@ -4519,6 +4529,7 @@
 	/pgfplots/compat/scale mode/1.13/.style={/pgfplots/compat/scale mode/1.6},
 	/pgfplots/compat/scale mode/1.14/.style={/pgfplots/compat/scale mode/1.6},
 	/pgfplots/compat/scale mode/1.15/.style={/pgfplots/compat/scale mode/1.6},
+	/pgfplots/compat/scale mode/1.16/.style={/pgfplots/compat/scale mode/1.6},
 	/pgfplots/compat/scale mode/default/.style={/pgfplots/compat/scale mode/1.5},
 	%
 	%
@@ -4538,6 +4549,7 @@
 	/pgfplots/compat/plot3graphics/1.13/.style=	{/pgfplots/compat/plot3graphics/1.6},%
 	/pgfplots/compat/plot3graphics/1.14/.style=	{/pgfplots/compat/plot3graphics/1.6},%
 	/pgfplots/compat/plot3graphics/1.15/.style=	{/pgfplots/compat/plot3graphics/1.6},%
+	/pgfplots/compat/plot3graphics/1.16/.style=	{/pgfplots/compat/plot3graphics/1.6},%
 	/pgfplots/compat/plot3graphics/default/.style=	{/pgfplots/compat/plot3graphics/1.5},%
 	%
 	% ATTENTION: there is a compatibility issue which slipped through
@@ -4583,6 +4595,7 @@
 	/pgfplots/compat/bar width by units/1.13/.style=		{/pgfplots/compat/bar width by units/1.7},
 	/pgfplots/compat/bar width by units/1.14/.style=		{/pgfplots/compat/bar width by units/1.7},
 	/pgfplots/compat/bar width by units/1.15/.style=		{/pgfplots/compat/bar width by units/1.7},
+	/pgfplots/compat/bar width by units/1.16/.style=		{/pgfplots/compat/bar width by units/1.7},
 	/pgfplots/compat/bar width by units/default/.style={/pgfplots/compat/bar width by units/pre 1.3},
 	%
 	/pgfplots/compat/BB/.is choice,
@@ -4601,6 +4614,7 @@
 	/pgfplots/compat/BB/1.13/.style=	{/pgfplots/compat/BB/1.8},%
 	/pgfplots/compat/BB/1.14/.style=	{/pgfplots/compat/BB/1.8},%
 	/pgfplots/compat/BB/1.15/.style=	{/pgfplots/compat/BB/1.8},%
+	/pgfplots/compat/BB/1.16/.style=	{/pgfplots/compat/BB/1.8},%
 	/pgfplots/compat/BB/default/.style={/pgfplots/compat/BB/pre 1.3},
 	%
 	/pgfplots/compat/general/.is choice,
@@ -4659,6 +4673,7 @@
 		/pgfplots/3d log sampling=true, % FIXME finish this feature: see unittest_log_sampling_3d
 		/pgfplots/clip limits compat=false,
 	},%
+	/pgfplots/compat/general/1.16/.style=	{/pgfplots/compat/general/1.15},%
 	/pgfplots/compat/general/default/.style={/pgfplots/compat/general/1.11},
 	%
 	/pgfplots/enable tick line clipping/.is if=pgfplots at enable@tick at line@clipping,
@@ -4676,7 +4691,7 @@
 	/pgfplots/compat/show suggested version/.is if=pgfplots at show@suggested at version,
 	/pgfplots/compat/show suggested version=true,
 	/pgfplots/compat/current/.initial=,
-	/pgfplots/compat/mostrecent/.initial=1.15,
+	/pgfplots/compat/mostrecent/.initial=1.16,
 	/utils/exec={%
 		\pgfplotsutilforeachcommasep{%
 			/pgfplots/compat/current,%
@@ -9547,6 +9562,10 @@
 \def\pgfplots at filter@input at ticks@with at log#1#2{%
 	\let\pgfplots at glob@TMPa=\pgfutil at empty
 	\foreach \pgfplots at loc@TMPb in {#1} {%
+		\pgfplotscoordmath{float}{parse}{\pgfplots at loc@TMPb}%
+		\pgfmathfloattofixed{\pgfmathresult}%
+		\let\pgfplots at loc@TMPb=\pgfmathresult
+		%
 		\pgfplotscoordmath{#2}{log}{\pgfplots at loc@TMPb}%
 		\ifx\pgfplots at glob@TMPa\pgfutil at empty
 			\xdef\pgfplots at glob@TMPa{\pgfmathresult}%
@@ -11648,8 +11667,10 @@
 %   	see \pgfplots at countplots@advance for details.
 %
 %
+%
 \def\pgfplots at environment@opt[#1]{%
 	\begingroup
+	\pgfplots at define@dummies at for@pseudoconstants
 	\pgfplotsifinaxis{%
 		\pgfplots at error{%
 			Sorry, nested axis environments are not supported.
@@ -11983,6 +12004,13 @@
 	\begingroup
 	\pgfplots at beforenode
 	%
+	\ifpgfplots at has@cell at picture
+	\else
+		% the transformations have already been applied to the
+		% coordinates which are used to setup the node. Reset them:
+		\pgftransformresetnontranslations
+	\fi
+	%
 	\ifpgfplots at deprecated@anchors
 		\pgfplots at restore@deprecated at lowlevel@shape
 		\pgfmultipartnode{\pgfplots at shapename}{\pgfplots at anchorname}{\tikz at fig@name}{\pgfusepath{discard}}%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -5,10 +5,10 @@
 \catcode`\:=12
 \catcode`\+=12
 \catcode`\-=12
-\gdef\pgfplotsrevision{1.15}
-\gdef\pgfplotsversion{1.15}
-\gdef\pgfplotsversiondatetime{2017-06-05 20:30:57 +0200}
-\gdef\pgfplotsrevisiondatetime{2017-06-05 20:30:57 +0200}
+\gdef\pgfplotsrevision{1.16}
+\gdef\pgfplotsversion{1.16}
+\gdef\pgfplotsversiondatetime{2018-03-28 20:42:04 +0200}
+\gdef\pgfplotsrevisiondatetime{2018-03-28 20:42:04 +0200}
 \gdef\pgfplots at glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}
 \xdef\pgfplotsversiondate{\expandafter\pgfplots at glob@TMPa\pgfplotsversiondatetime\relax}
 \xdef\pgfplotsrevisiondate{\expandafter\pgfplots at glob@TMPa\pgfplotsrevisiondatetime\relax}

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -2071,6 +2071,10 @@
 				}%
 			}%
 			\expandafter\pgfutilsolvetwotwoleq\pgfplots at loc@TMPa
+			\ifx\pgfmathresult\pgfutil at empty
+				\pgfplots at error{Singular matrix encountered during view computation. Please choose different input values.}%
+				\def\pgfmathresult{{0}{0}}%
+			\fi
 			\def\pgfplots at loc@TMPb##1##2{%
 				\def\pgfplots at view@dir at threedim@x{##1}%
 				\def\pgfplots at view@dir at threedim@y{##2}%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -1775,6 +1775,10 @@
 		\edef\pgfplots at RHS{{\pgf at sys@tonumber\pgf at x}{\pgf at sys@tonumber\pgf at y}}%
 		%
 		\pgfutilsolvetwotwoleq{\pgfplots at LEQ}{\pgfplots at RHS}%
+		\ifx\pgfmathresult\pgfutil at empty
+			\pgfplots at error{Singular matrix encountered while computing boundary anchor. Please choose different values.}%
+			\def\pgfmathresult{0}{0}%
+		\fi
 		\def\pgfplots at extract##1##2{%
 			\def\pgfplots at r{##1}%
 		}%
@@ -3082,6 +3086,12 @@
 }%
 \let\pgfplotsscanlinelength at nan@cleanup=\relax
 \def\pgfplotsscanlinelength at nan@pendingwork at PREPARED{%
+	\pgfplotsplothandlerappendjumpmarker`
+	%
+	\let\pgfplotsscanlinelength at nan@pendingwork=\relax
+}%
+
+\def\pgfplotsplothandlerappendjumpmarker{%
 	\ifpgfplots at LUA@backend at supported
 		\pgfplotsutil at directlua{pgfplots.texSurveyAddJump()}%
 	\else
@@ -3100,8 +3110,6 @@
 		\def\pgfplotsaxisplothasjumps{1}%
 		\pgfplotsaxisserializedatapoint
 	\fi
-	%
-	\let\pgfplotsscanlinelength at nan@pendingwork=\relax
 }%
 %
 % -------------------------------------------------------------------------------
@@ -3421,6 +3429,16 @@
 			\pgfplotscoordmath{meta}{parsenumber}{0}%
 		\fi
 	}%
+	\pgfmathredeclarefunction{thisrow}{%
+		\getthisrow{##1}\pgfmathresult
+		% XXX : this does NOT allow to return string values,
+		% unfortunately! the fpu makes garbage out of it.
+		% I already tried to parse it here and return special string
+		% markers, but that approach requires much more effort...
+	}%
+	\pgfmathredeclarefunction{thisrowno}{%
+		\getthisrowno{##1}\pgfmathresult
+	}%
 	%
 	% %%%%%%%%%%%%%%
 	%
@@ -3481,6 +3499,14 @@
 	\fi
 }%
 
+\def\pgfplots at define@dummies at for@pseudoconstants{%
+	\pgfmathdeclarefunction{thisrow}{1}{%
+		\pgfplots at error{You cannot use 'thisrow' in the current context.}%
+	}%
+	\pgfmathdeclarefunction{thisrowno}{1}{%
+		\pgfplots at error{You cannot use 'thisrowno' in the current context.}%
+	}%
+}%
 \def\pgfplotsaxisupdatelimitsforpointmeta#1{%
 	\begingroup
 	\def\pgfplots at current@point at meta{#1}%
@@ -6294,6 +6320,8 @@
 		 % I invoke the private '@opt@' method because the semicolon ';'
 		 % character may cause problems due to catcode mismatches.
 		 % *sigh*.
+		\let\pgfplots at addplotimpl@file at parsesingle@twodim=\pgfplots at addplotimpl@file at parsesingle@twodim at gnuplotformat
+		\let\pgfplots at addplotimpl@file at parsesingle@threedim=\pgfplots at addplotimpl@file at parsesingle@threedim at gnuplotformat
 		\pgfplots at addplotimpl@file at opt@@{}{}{#2}{#1}% this does not invoke the \pgfplots at start@plot at with@behavioroptions method.
 	\else
 		\expandafter\pgfplots at end@plot
@@ -6428,6 +6456,44 @@
 	\fi
 }%
 
+\def\pgfplots at gnuplot@unbounded{u}%
+\def\pgfplots at gnuplot@unbounded at handler@jump{jump}%
+\def\pgfplots at gnuplot@handle at unbounded{%
+	\pgfkeysgetvalue{/pgfplots/empty line}\pgfplots at loc@TMPa%
+	\ifx\pgfplots at loc@TMPa\pgfplots at gnuplot@unbounded at handler@jump
+		\pgfplotsplothandlerappendjumpmarker
+	\else
+		\ifpgfplots at curplot@threedim
+			\def\pgfplots at current@point at z{nan}%
+		\else
+			\def\pgfplots at current@point at y{nan}%
+		\fi
+		\pgfplots at coord@stream at coord%
+	\fi
+}
+\def\pgfplots at addplotimpl@file at parsesingle@threedim at gnuplotformat#1 #2 #3 #4 #5\pgfplots at EOI{%
+	\def\pgfplots at current@point at x{#1}%
+	\def\pgfplots at current@point at y{#2}%
+	\def\pgfplots at current@point at z{#3}%
+	\def\pgfplots at loc@TMPa{#4}%
+	\ifx\pgfplots at loc@TMPa\pgfplots at gnuplot@unbounded%
+		% a special gnuplot "unbounded" marker
+		\pgfplots at gnuplot@handle at unbounded
+	\else
+		\pgfplots at coord@stream at coord%
+	\fi
+}%
+\def\pgfplots at addplotimpl@file at parsesingle@twodim at gnuplotformat#1 #2 #3 #4\pgfplots at EOI{%
+	\def\pgfplots at current@point at x{#1}%
+	\def\pgfplots at current@point at y{#2}%
+	\def\pgfplots at loc@TMPa{#3}%
+	\ifx\pgfplots at loc@TMPa\pgfplots at gnuplot@unbounded
+		% a special gnuplot "unbounded" marker
+		\pgfplots at gnuplot@handle at unbounded
+	\else
+		\pgfplots at coord@stream at coord%
+	\fi
+}%
 \def\pgfplots at addplotimpl@file at parsesingle@threedim#1 #2 #3 #4\pgfplots at EOI{%
 	\def\pgfplots at current@point at x{#1}%
 	\def\pgfplots at current@point at y{#2}%
@@ -6676,14 +6742,14 @@
 	\let\pgfplotstable at coordindex@old=\coordindex
 	\def\coordindex{\pgfplotstablerow}%
 	\def\lineno{\coordindex}% is the same here
-	% These macros are-unfortunately- not accessable here. And the
+	% The normal implementation of \thisrow is not accessable here. And the
 	% worst is: error messages are impossible either because they are
-	% not executed... try to provide useful hints:
-	\def\thisrow##1{thisrow_unavailable_load_table_directly}%
-	\def\thisrowno##1{thisrowno_unavailable_load_table_directly}%
+	% not executed... we resort to the associated math functions:
+	\def\thisrow##1{thisrow("##1")}% let us hope that math parsing is active!
+	\def\thisrowno##1{thisrowno(##1)}%
 	% this should work.
-	\def\getthisrow##1##2{\pgfplotstablegetelem{\coordindex}{##1}\of{#3}{##2}}%
-	\def\getthisrowno##1##2{\pgfplotstablegetelem{\coordindex}{[index]##1}\of{#3}{##2}}%
+	\def\getthisrow##1##2{\pgfplotstablegetelem{\coordindex}{##1}\of{#3}\let##2=\pgfplotsretval}%
+	\def\getthisrowno##1##2{\pgfplotstablegetelem{\coordindex}{[index]##1}\of{#3}\let##2=\pgfplotsretval}%
 	%
 	\expandafter\pgfplotstablegetcolumnbyname\expandafter{\pgfplots at plot@tbl at x}\of#3\to\addplot at tbl@x
 	\expandafter\pgfplotstablegetcolumnbyname\expandafter{\pgfplots at plot@tbl at y}\of#3\to\addplot at tbl@y
@@ -7379,9 +7445,29 @@
 % #1 the target which will contain the filter
 % #2 a math expression.
 \def\pgfplots at install@filter at expression#1#2{%
-	\pgfkeysdef{/pgfplots/#1}{\pgfplots at filter@expression{#1}}%
+	\pgfkeysdef{/pgfplots/#1}{%
+		% DO NOT MODIFY THIS VALUE without also modifying 
+		%  \pgfplots at ifisfilterexpression!
+		\pgfplots at filter@expression{#1}%
+	}%
+	%
+	% remember for lua backend:
 	\pgfkeyssetvalue{/pgfplots/#1/@expressionvalue}{#2}%
 }%
+% #1 the target which will contain the filter
+% #2 a math expression.
+\def\pgfplots at install@filter at expression@append#1#2{%
+	\pgfkeysgetvalue{/pgfplots/#1/. at cmd}\pgfplots at loc@TMPc
+	\ifx\pgfplots at loc@TMPc\pgfplots at empty@command at key
+		% ok, this is the first filter. Make sure it can also be
+		% processed by the lua backend
+		\pgfplots at install@filter at expression{#1}{#2}%
+	\else
+		% there is a subtle difference to /.expression: this here CANNOT
+		% be processed by the lua backend!
+		\pgfkeysalso{/pgfplots/#1/.append code={\pgfplots at filter@expression@{#1}{#2}}}%
+	\fi
+}%
 
 % Executes #2 if the filter key was defined by
 % \pgfplots at install@filter at expression.
@@ -7399,14 +7485,18 @@
 	\fi
 }%
 
-% the key name (example: 'x filter')
+% #1 the key name (example: 'x filter')
 \def\pgfplots at filter@expression#1{%
+	\pgfplots at filter@expression@{#1}{\pgfkeysvalueof{/pgfplots/#1/@expressionvalue}}%
+}%
+% #1 the key name (example: 'x filter')
+% #2 the expression
+\def\pgfplots at filter@expression@#1#2{%
 	\begingroup
 	\pgfkeys{/pgf/fpu=true,%
 		/pgf/fpu/output format=float,%
 	}%
-	\pgfkeysgetvalue{/pgfplots/#1/@expressionvalue}\pgfplots at loc@TMPa
-	\pgfmathparse{\pgfplots at loc@TMPa}%
+	\pgfmathparse{#2}%
 	\pgfmath at smuggleone\pgfmathresult
 	\endgroup
 }%
@@ -7578,16 +7668,55 @@
 	\fi
 }%
 
-% Returns the current points into the keys
+% A command which returns high-level (logical) coordinates into the keys
 % /data point/x
 % /data point/y
 % /data point/z
 % /data point/meta
+% /data point/index
+%
+% The command has two modes:
+%
+% 1. without arguments. In this case, it reads the "current" point
+% from the plot handler.
+%
+% 2. with an argument in curly braces. In this case, it expects one of
+% the following:
+% a) a \pgfpoint instruction (i.e. some code which assigns \pgf at x and
+% \pgf at y) and returns the associated logical (high-level) coordinates.
+% b) a TikZ point starting with '('.
+%
+% Examples:
+% * \pgfplotspointgetcoordinates
+%  -> useful for nodes near coords
+% * \pgfplotspointgetcoordinates{\pgfpoint{200pt}{100pt}}
+% * \pgfplotspointgetcoordinates{(5,3)}
+%
+%
+% This works for 2D axes only.
+%
 \def\pgfplotspointgetcoordinates{%
+	\pgfutil at ifnextchar\bgroup{%
+		\pgfplotspointgetcoordinates at frompgfpoint
+	}{%	
+		\pgfplotspointgetcoordinates at currentpoint
+	}%
+}%
+\def\pgfplotspointgetcoordinates at frompgfpoint#1{%
+	\pgfplotspointgetnormalizedcoordinates{#1}%
+	\pgfplotspointgetcoordinatesfromnormalized
+}%
+\def\pgfplotspointgetcoordinates at currentpoint{%
 	\pgfplotspointgetnormalizedcoordinates
 	\pgfplotspointgetcoordinatesfromnormalized
 }%
 
+\def\pgfplotspointgetnormalizedcoordinates@@@x{undefined}
+\def\pgfplotspointgetnormalizedcoordinates@@@y{undefined}
+\def\pgfplotspointgetnormalizedcoordinates@@@z{undefined}
+\let\pgfplotspointgetnormalizedcoordinates@@@index=\pgfutil at empty
+\let\pgfplotspointgetnormalizedcoordinates@@@meta=\pgfutil at empty
+
 % PRECONDITION: \pgfplots at current@point at x and its variants is given in
 % TRANSFORMED format, i.e. we assume that we are in the visualization
 % phase after the coordinates have been prepared.
@@ -7599,7 +7728,7 @@
 	% computation due to the LUA backend in which case remembering it
 	% leads to extensive (=expensive?) communication between lua and
 	% TeX. Does it hurt here? Scatter plots compute this stuff...
-	\expandafter\let\expandafter\pgfplotsretval\csname pgfplots at current@point@#1\endcsname
+	\expandafter\let\expandafter\pgfplotsretval\csname pgfplotspointgetnormalizedcoordinates@@@#1\endcsname
 	\ifx\pgfplotsretval\pgfutil at empty
 	\else
 		\pgfplots at if{pgfplots at apply@datatrafo@#1}{%
@@ -7612,6 +7741,52 @@
 % Same as \pgfplotspointgetcoordinates, but the resulting values are
 % for use in 'normalized axis cs'.
 \def\pgfplotspointgetnormalizedcoordinates{%
+	\pgfutil at ifnextchar\bgroup{%
+		\pgfplotspointgetnormalizedcoordinates at frompgfpoint
+	}{%
+		\pgfplotspointgetnormalizedcoordinates at currentpoint
+	}%
+}
+\def\pgfplotspointgetnormalizedcoordinates at frompgfpoint#1{%
+	\pgfplotspointgetnormalizedcoordinates at frompgfpoint@#1\pgfplots at EOI
+}
+\def\pgfplotspointgetnormalizedcoordinates at frompgfpoint@{%
+	\pgfutil at ifnextchar({\pgfplotspointgetnormalizedcoordinates at frompgfpoint@tikz}{\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@}%
+}%
+\def\pgfplotspointgetnormalizedcoordinates at frompgfpoint@tikz#1\pgfplots at EOI{%
+	\def\pgfplots at loc@TMPa{#1}%
+	\def\pgfplots at loc@TMPb{(.)}%
+	\ifx\pgfplots at loc@TMPa\pgfplots at loc@TMPb
+		\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@\tikz at last@position\pgfplots at EOI
+	\else
+		\tikz at scan@one at point\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@@#1\relax
+	\fi
+}%
+\def\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@@#1{%
+	\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@#1\pgfplots at EOI
+}
+\def\pgfplotspointgetnormalizedcoordinates at frompgfpoint@@#1\pgfplots at EOI{%
+	\pgf at process{#1}%
+	\pgfplotsconvertunittocoordinate{x}{\pgf at x}%
+	\let\pgfplotspointgetnormalizedcoordinates@@@x=\pgfmathresult
+	\pgfplotsconvertunittocoordinate{y}{\pgf at y}%
+	\let\pgfplotspointgetnormalizedcoordinates@@@y=\pgfmathresult
+	\let\pgfplotspointgetnormalizedcoordinates@@@z=\pgfutil at empty
+	\let\pgfplotspointgetnormalizedcoordinates@@@index=\pgfutil at empty
+	\let\pgfplotspointgetnormalizedcoordinates@@@meta=\pgfutil at empty
+	%
+	\pgfplotspointgetnormalizedcoordinates at internal%
+}%
+
+\def\pgfplotspointgetnormalizedcoordinates at currentpoint{%
+	\let\pgfplotspointgetnormalizedcoordinates@@@x=\pgfplots at current@point at x
+	\let\pgfplotspointgetnormalizedcoordinates@@@y=\pgfplots at current@point at y
+	\let\pgfplotspointgetnormalizedcoordinates@@@z=\pgfplots at current@point at z
+	\let\pgfplotspointgetnormalizedcoordinates@@@meta=\pgfplots at current@point at meta
+	\let\pgfplotspointgetnormalizedcoordinates@@@index=\pgfplots at current@point at coordindex
+	\pgfplotspointgetnormalizedcoordinates at internal
+}
+\def\pgfplotspointgetnormalizedcoordinates at internal{%
 	\pgfplotspointgetnormalizedcoordinates@ x%
 	\pgfkeyslet{/data point/x}\pgfplotsretval
 	%
@@ -7625,8 +7800,8 @@
 		\pgfkeyslet{/data point/z}\pgfutil at empty
 	\fi
 	%
-	\pgfkeyslet{/data point/meta}\pgfplots at current@point at meta
-	\edef\pgfplots at loc@TMPa{\pgfplots at current@point at coordindex}%
+	\pgfkeyslet{/data point/meta}\pgfplotspointgetnormalizedcoordinates@@@meta
+	\edef\pgfplots at loc@TMPa{\pgfplotspointgetnormalizedcoordinates@@@index}%
 	\pgfkeyslet{/data point/index}\pgfplots at loc@TMPa
 }%
 
@@ -7681,14 +7856,18 @@
 	\pgfplots at glob@TMPa
 }%
 \def\pgfplotspointgetcoordinatesfromnormalized at transform#1#2{%
-	\pgfplots at if{pgfplots@#1islinear}{%
-		\pgfplotscoordmath{#1}{tofixed}{#2}%
-	}{%
-		\pgfplotscoordmath{#1}{exp}{#2}%
-	}%
-	\let#2=\pgfmathresult
-	\pgfplots at coord@inv at trafo@apply{#1}{#2}%
-	\let#2=\pgfmathresult
+	\edef\pgfplots at loc@TMPa{#2}%
+	\ifx\pgfplots at loc@TMPa\pgfutil at empty
+	\else
+		\pgfplots at if{pgfplots@#1islinear}{%
+			\pgfplotscoordmath{#1}{tofixed}{#2}%
+		}{%
+			\pgfplotscoordmath{#1}{exp}{#2}%
+		}%
+		\let#2=\pgfmathresult
+		\pgfplots at coord@inv at trafo@apply{#1}{#2}%
+		\let#2=\pgfmathresult
+	\fi
 }%
 
 % Defines an optimized and matching \pgfplotsaxisvisphasetransformcoordinate
@@ -7857,6 +8036,8 @@
 		\noexpand\gdef\noexpand\pgfplotspointplotattimefirst{\pgfplotspointplotattimefirst}%
 		\noexpand\gdef\noexpand\pgfplotspointplotattimesecond{\pgfplotspointplotattimesecond}%
 		\noexpand\gdef\noexpand\pgfplotspointplotattimecoords{\pgfplotspointplotattimecoords}%
+		\noexpand\pgf at x=\the\pgf at x\space% attempt to fix bugs/94/ aka q/271792/.
+		\noexpand\pgf at y=\the\pgf at y\space% sometimes there are \noexpand sometimes there are not.
 	}%
 	\t at pgfplots@toka=\expandafter{\pgfplotspointplotattime at cache}%
 	\t at pgfplots@tokb=\expandafter{\pgfplots at loc@TMPa}%

Modified: trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex	2018-04-08 19:08:43 UTC (rev 47372)
+++ trunk/Master/texmf-dist/tex/generic/pgfplots/pgfplotsticks.code.tex	2018-04-08 19:45:42 UTC (rev 47373)
@@ -2521,14 +2521,24 @@
 % take one arg)
 % #3: the output macro name
 \long\def\pgfplots at apply@data at scale@trafo at to@user at ticks#1#2\to#3{%
-	\let#3=\pgfutil at empty
+	\pgfplots at transform@csv at list{#1}\to{#3}\with{%
+		\pgfplotscoordmath{float}{parse}{\pgfmathresult}%
+		%\pgfmathfloatparsenumber{\pgfmathresult}%
+		#2{\pgfmathresult}%
+	}%
+}%
+
+% A helper macro which expects a \foreach-list '#1'. applies some transformation '#3' and stores results into a new csv list '#2'.
+% '#3' is some macro. Its input is '\pgfmathresult', its expected output is '\pgfmathresult'
+\long\def\pgfplots at transform@csv at list#1\to#2\with#3{%
+	\let#2=\pgfutil at empty
 	\foreach \pgfplots at loc@TMPb in {#1} {%
-		\pgfmathfloatparsenumber{\pgfplots at loc@TMPb}%
-		#2{\pgfmathresult}%
-		\ifx#3\pgfutil at empty
-			\xdef#3{\pgfmathresult}%
+		\let\pgfmathresult=\pgfplots at loc@TMPb
+		#3%
+		\ifx#2\pgfutil at empty
+			\xdef#2{\pgfmathresult}%
 		\else
-			\xdef#3{#3,\pgfmathresult}%
+			\xdef#2{#2,\pgfmathresult}%
 		\fi
 	}%
 	%



More information about the tex-live-commits mailing list