summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-26 21:36:14 +0000
committerKarl Berry <karl@freefriends.org>2012-10-26 21:36:14 +0000
commit4147899f17a6e0b0dde20f309845c4fc0032bce9 (patch)
tree3609a0dc99736d7a2081187b9e12e9bac63c6bb6 /Master/texmf-dist/tex
parent3d12d871ae8a0e941fb2521bdc99ce436aeb17c6 (diff)
pgfplots (26oct12)
git-svn-id: svn://tug.org/texlive/trunk@28094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex708
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots.lua30
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex20
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex4
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex23
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex53
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex389
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex16
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex33
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex187
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex15
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex740
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex76
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex12
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex2
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex66
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex2
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty13
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty7
34 files changed, 1976 insertions, 454 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex
index 79990ec1fb8..933f48854d2 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/libs/tikzlibrarypgfplots.patchplots.code.tex
@@ -56,9 +56,18 @@
+% A quadratic spline in the ordering
+%
+% <left> <right> <middle>
+%
+% where <left> is the function value at the left end of the spline
+% segmment, <right> the function value at the right end, and <middle>
+% the function value in the middle of the spline segment.
\pgfplotsdeclarepatchclass{quadratic spline}{%
allow matrix=0,
uses view depth=0,
+ get dimension=1,
+ supports global path=1,
new=\def\pgfplotspatchclass@qspline@no{A},
set next vertex={%
% EXPECTED ORDERING: first 2 corners, then 1 mid nodes
@@ -72,6 +81,31 @@
\expandafter\let\expandafter\pgfplotspatchclass@qspline@no\csname pgfpptchindexnext@\pgfplotspatchclass@qspline@no\endcsname
\fi
},
+ if current point can be first last={%
+ \pgfplots@loc@tmptrue
+ \if A\pgfplotspatchclass@qspline@no
+ % Ah - the current point is the 'C' point, i.e. the
+ % control point (we have advanced the '@no' counter)
+ \pgfplots@loc@tmpfalse
+ \fi
+ \ifpgfplots@loc@tmp
+ #1\relax%
+ \else
+ #2\relax
+ \fi
+ },
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@qspline@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@qspline@A\endvertex #1%
@@ -93,7 +127,7 @@
% in does the same.
\def\pgfplots@edge{%
\ifx\pgfplotspatchclass@qspline@A\PA
- \pgfpathmoveto{\expandafter\pgfplotspointpatchvertex\PA\endvertex}%
+ \pgfplotsplothandlermesh@pathmoveto{\expandafter\pgfplotspointpatchvertex\PA\endvertex}%
\fi
\pgfpathcurveto {%
\pgfpointadd
@@ -111,6 +145,7 @@
\let\PB=\pgfplotspatchclass@qspline@C
\let\PC=\pgfplotspatchclass@qspline@B
\pgfplots@edge
+ \pgfplotsplothandlermesh@setlastpoint{\expandafter\pgfplotspointpatchvertex\PC\endvertex}%
\endgroup
},
triangulate class=line,
@@ -156,6 +191,8 @@
\pgfplotsdeclarepatchclass{cubic spline}{%
allow matrix=0,
uses view depth=0,
+ get dimension=1,
+ supports global path=1,
new=\def\pgfplotspatchclass@cspline@no{A},
set next vertex={%
% EXPECTED ORDERING: first 2 corners, then 1 mid nodes
@@ -169,6 +206,39 @@
\expandafter\let\expandafter\pgfplotspatchclass@cspline@no\csname pgfpptchindexnext@\pgfplotspatchclass@cspline@no\endcsname
\fi
},
+ if current point can be first last={%
+ \pgfplots@loc@tmpfalse
+ \if B\pgfplotspatchclass@cspline@no
+ % Ah - the current point is the 'A' point (we have
+ % advanced the '@no' counter)
+ \pgfplots@loc@tmptrue
+ \fi
+ \if C\pgfplotspatchclass@cspline@no
+ % Ah - the current point is the 'B' point (we have
+ % advanced the '@no' counter)
+ \pgfplots@loc@tmptrue
+ \fi
+ \ifpgfplots@loc@tmp
+ #1\relax%
+ \else
+ #2\relax
+ \fi
+ },
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.3333333}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.6666666}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@cspline@A\endvertex #1%
@@ -178,32 +248,13 @@
},
fill path={%
% Draw the patch boundary using a bezier curve.
- \pgfpathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@A\endvertex}%
- % switch basis from lagrange to bezier (see formular on top of
- % this file)
- \pgfpathcurveto {%
- \begingroup
- \pgfplotspatchvertexaccumstart
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@A\times{-0.833333}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@C\times{3}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@D\times{-1.5}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@B\times{0.3333333}%
- \pgfplotspatchvertexfinish\pgfplots@loc@TMPa
- \expandafter\pgfplotspointpatchvertex\pgfplots@loc@TMPa\endvertex
- \endgroup
- }{%
- \begingroup
- \pgfplotspatchvertexaccumstart
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@A\times{0.333333}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@C\times{-1.5}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@D\times{3}%
- \expandafter\pgfplotspatchvertexaddXY\pgfplotspatchclass@cspline@B\times{-0.833333}%
- \pgfplotspatchvertexfinish\pgfplots@loc@TMPa
- \expandafter\pgfplotspointpatchvertex\pgfplots@loc@TMPa\endvertex
- \endgroup
- }{%
- \expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@B\endvertex
- }%
+ \pgfplotsplothandlermesh@pathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@A\endvertex}%
+ \pgfplotspathcubicfrominterpolation
+ {\pgfplotspatchclass@cspline@A}%
+ {\pgfplotspatchclass@cspline@C}%
+ {\pgfplotspatchclass@cspline@D}%
+ {\pgfplotspatchclass@cspline@B}%
+ \pgfplotsplothandlermesh@setlastpoint{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@cspline@B\endvertex}%
},
triangulate class=line,
triangulate={%
@@ -299,6 +350,34 @@
get num vertices=4,
}%
+\def\pgfplotspathcubicfrominterpolation#1#2#3#4{%
+ % switch basis from lagrange to bezier (see formular on top of
+ % this file)
+ \pgfpathcurveto {%
+ \begingroup
+ \pgfplotspatchvertexaccumstart
+ \expandafter\pgfplotspatchvertexaddXY#1\times{-0.833333}%
+ \expandafter\pgfplotspatchvertexaddXY#2\times{3}%
+ \expandafter\pgfplotspatchvertexaddXY#3\times{-1.5}%
+ \expandafter\pgfplotspatchvertexaddXY#4\times{0.3333333}%
+ \pgfplotspatchvertexfinish\pgfplots@loc@TMPa
+ \expandafter\pgfplotspointpatchvertex\pgfplots@loc@TMPa\endvertex
+ \endgroup
+ }{%
+ \begingroup
+ \pgfplotspatchvertexaccumstart
+ \expandafter\pgfplotspatchvertexaddXY#1\times{0.333333}%
+ \expandafter\pgfplotspatchvertexaddXY#2\times{-1.5}%
+ \expandafter\pgfplotspatchvertexaddXY#3\times{3}%
+ \expandafter\pgfplotspatchvertexaddXY#4\times{-0.833333}%
+ \pgfplotspatchvertexfinish\pgfplots@loc@TMPa
+ \expandafter\pgfplotspointpatchvertex\pgfplots@loc@TMPa\endvertex
+ \endgroup
+ }{%
+ \expandafter\pgfplotspointpatchvertex#4\endvertex
+ }%
+}%
+
% make a linearized sequence around the edge of the quad.triangle.
% note the ordering: first 3 corners, then 3 mid nodes:
\def\pgfplots@qtri@next@A{D}%
@@ -342,6 +421,50 @@
\expandafter\let\expandafter\pgfplotspatchclass@qtri@no\csname pgfpptchindexnext@\pgfplotspatchclass@qtri@no\endcsname
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ %
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \pgfplotspatchready
+ %
+ %
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ %
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@qtri@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@qtri@A\endvertex #1%
@@ -797,6 +920,21 @@
\pgfplotspatchready%
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex #1%
@@ -1145,6 +1283,36 @@
\expandafter\let\expandafter\pgfplotspatchclass@biquad@no\csname pgfpptchindexnext@\pgfplotspatchclass@biquad@no\endcsname
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \def\pgfplotspatchclassx{0.5}%
+ \def\pgfplotspatchclassy{0.5}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@biquad@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@biquad@A\endvertex #1%
@@ -1833,3 +2001,489 @@
get num vertices=16,
get num cdata vertices=4,
}%
+
+% A bicubic patch with 16 points.
+%
+% It expects points in the order (i.e. in matrix ordering, row-wise):
+%
+% AD BD CD DD
+% AC BC CC DC
+% AB BB CB DB
+% AA BA CA DA
+%
+\pgfplotsdeclarepatchclass{bicubic}{%
+ allow matrix=0,
+ new=\def\pgfplotspatchclass@bicubic@row{A}\def\pgfplotspatchclass@bicubic@col{A},
+ set next vertex={%
+ % defines \pgfplotspatchclass@bicubic@AA ... \pgfplotspatchclass@bicubic@DD (16 points)
+ \expandafter\edef\csname pgfplotspatchclass@bicubic@\pgfplotspatchclass@bicubic@row\pgfplotspatchclass@bicubic@col\endcsname{#1}%
+ \if D\pgfplotspatchclass@bicubic@row
+ \def\pgfplotspatchclass@bicubic@row{A}%
+ \if D\pgfplotspatchclass@bicubic@col
+ \def\pgfplotspatchclass@bicubic@col{A}%
+ \pgfplotspatchready
+ \else
+ \expandafter\let\expandafter\pgfplotspatchclass@bicubic@col\csname pgfpptchindexnext@\pgfplotspatchclass@bicubic@col\endcsname
+ \fi
+ \else
+ \expandafter\let\expandafter\pgfplotspatchclass@bicubic@row\csname pgfpptchindexnext@\pgfplotspatchclass@bicubic@row\endcsname
+ \fi
+ },
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.333333333}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0.666666666}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ %
+ %
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0.333333333}%
+ #1%
+ \def\pgfplotspatchclassx{0.333333333}%
+ \def\pgfplotspatchclassy{0.333333333}%
+ #1%
+ \def\pgfplotspatchclassx{0.666666666}%
+ \def\pgfplotspatchclassy{0.333333333}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0.333333333}%
+ #1%
+ %
+ %
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0.666666666}%
+ #1%
+ \def\pgfplotspatchclassx{0.333333333}%
+ \def\pgfplotspatchclassy{0.666666666}%
+ #1%
+ \def\pgfplotspatchclassx{0.666666666}%
+ \def\pgfplotspatchclassy{0.666666666}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0.666666666}%
+ #1%
+ %
+ %
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0.333333333}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0.666666666}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ %
+ %
+ %
+ \pgfplotspatchready
+ },%
+ first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AA\endvertex,
+ foreach vertex={%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@BA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@CA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AB\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@BB\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@CB\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DB\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AC\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@BC\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@CC\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DC\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AD\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@BD\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@CD\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DD\endvertex #1%
+ },
+ foreach cdata vertex={%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DA\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@DD\endvertex #1%
+ \expandafter\pgfplotspatchvertex\pgfplotspatchclass@bicubic@AD\endvertex #1%
+ },
+ fill path={%
+ % Visualize the patch boundary using four bezier curves.
+ %
+ % This involves a change from Lagrange to bezier
+ % representation of the boundary curves.
+ %
+ \pgfpathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@bicubic@AA\endvertex}%
+ \pgfplotspathcubicfrominterpolation
+ {\pgfplotspatchclass@bicubic@AA}
+ {\pgfplotspatchclass@bicubic@BA}
+ {\pgfplotspatchclass@bicubic@CA}
+ {\pgfplotspatchclass@bicubic@DA}
+ \pgfplotspathcubicfrominterpolation
+ {\pgfplotspatchclass@bicubic@DA}
+ {\pgfplotspatchclass@bicubic@DB}
+ {\pgfplotspatchclass@bicubic@DC}
+ {\pgfplotspatchclass@bicubic@DD}
+ \pgfplotspathcubicfrominterpolation
+ {\pgfplotspatchclass@bicubic@DD}
+ {\pgfplotspatchclass@bicubic@CD}
+ {\pgfplotspatchclass@bicubic@BD}
+ {\pgfplotspatchclass@bicubic@AD}
+ \pgfplotspathcubicfrominterpolation
+ {\pgfplotspatchclass@bicubic@AD}
+ {\pgfplotspatchclass@bicubic@AC}
+ {\pgfplotspatchclass@bicubic@AB}
+ {\pgfplotspatchclass@bicubic@AA}
+ \pgfpathclose
+ },
+ stream to shader={%
+ \begingroup
+ %
+ % AD BD CD DD
+ % AC BC CC DC
+ % AB BB CB DB
+ % AA BA CA DA
+ %
+ % STEP 1: ensure that the patch's coordinates are streamed in
+ % a sequence which is compatible with the DEPTH of the
+ % corners.
+ %
+ % we use
+ % \pgfplotspatchclass@rect@to@coonspatch@findshadingsequence@for@depth
+ % which works for bilinear, biquadratic, and bicubic
+ %
+ % define helper macros which are input for
+ % \pgfplotspatchclass@rect@to@coonspatch@findshadingsequence@for@depth:
+ \let\pgfplotspatchclass@rect@A=\pgfplotspatchclass@bicubic@AA
+ \let\pgfplotspatchclass@rect@B=\pgfplotspatchclass@bicubic@DA
+ \let\pgfplotspatchclass@rect@C=\pgfplotspatchclass@bicubic@DD
+ \let\pgfplotspatchclass@rect@D=\pgfplotspatchclass@bicubic@AD
+ \pgfplotspatchclass@rect@to@coonspatch@findshadingsequence@for@depth
+ {pgfplotspatchclass@rect@}{\Pcur}{\Pnextseq}%
+ %
+ %\message{using \Pcur\space(set = \Pnextseq)^^J}%
+ % now, translate the result into our matrix form.
+ % This means to (a) identify the FIRST point which needs to be
+ % streamed (it is stored in \Pcur as 'A', 'B', 'C', or 'D')
+ % and (b) keep in mind that we have to take care of the
+ % sequence in which points are streamed ("forward" means to
+ % rotate the matrix elements and "backward" means to transpose
+ % the "forward" result).
+ %
+ \if A\Pcur
+ % Ah - the point "AA" needs to be streamed as first.
+ %
+ % Well, this is simple: take the matrix as-is!
+ % simply copy 1:1
+ \let\P@AA=\pgfplotspatchclass@bicubic@AA
+ \let\P@BA=\pgfplotspatchclass@bicubic@BA
+ \let\P@CA=\pgfplotspatchclass@bicubic@CA
+ \let\P@DA=\pgfplotspatchclass@bicubic@DA
+ \let\P@AB=\pgfplotspatchclass@bicubic@AB
+ \let\P@BB=\pgfplotspatchclass@bicubic@BB
+ \let\P@CB=\pgfplotspatchclass@bicubic@CB
+ \let\P@DB=\pgfplotspatchclass@bicubic@DB
+ \let\P@AC=\pgfplotspatchclass@bicubic@AC
+ \let\P@BC=\pgfplotspatchclass@bicubic@BC
+ \let\P@CC=\pgfplotspatchclass@bicubic@CC
+ \let\P@DC=\pgfplotspatchclass@bicubic@DC
+ \let\P@AD=\pgfplotspatchclass@bicubic@AD
+ \let\P@BD=\pgfplotspatchclass@bicubic@BD
+ \let\P@CD=\pgfplotspatchclass@bicubic@CD
+ \let\P@DD=\pgfplotspatchclass@bicubic@DD
+ \fi
+ \if B\Pcur
+ % the "DA" point needs to be streamed as first.
+ %
+ % Reorder
+ % AD BD CD DD
+ % AC BC CC DC
+ % AB BB CB DB
+ % AA BA CA DA
+ % to
+ % AA AB AC AD
+ % BA BB BC BD
+ % CA CB CC CD
+ % DA DB DC DD
+ %
+ \let\P@AA=\pgfplotspatchclass@bicubic@DA
+ \let\P@BA=\pgfplotspatchclass@bicubic@DB
+ \let\P@CA=\pgfplotspatchclass@bicubic@DC
+ \let\P@DA=\pgfplotspatchclass@bicubic@DD
+ \let\P@AB=\pgfplotspatchclass@bicubic@CA
+ \let\P@BB=\pgfplotspatchclass@bicubic@CB
+ \let\P@CB=\pgfplotspatchclass@bicubic@CC
+ \let\P@DB=\pgfplotspatchclass@bicubic@CD
+ \let\P@AC=\pgfplotspatchclass@bicubic@BA
+ \let\P@BC=\pgfplotspatchclass@bicubic@BB
+ \let\P@CC=\pgfplotspatchclass@bicubic@BC
+ \let\P@DC=\pgfplotspatchclass@bicubic@BD
+ \let\P@AD=\pgfplotspatchclass@bicubic@AA
+ \let\P@BD=\pgfplotspatchclass@bicubic@AB
+ \let\P@CD=\pgfplotspatchclass@bicubic@AC
+ \let\P@DD=\pgfplotspatchclass@bicubic@AD
+ \fi
+ \if C\Pcur
+ % the "DD" point needs to be streamed as first.
+ %
+ % Reorder
+ % AD BD CD DD
+ % AC BC CC DC
+ % AB BB CB DB
+ % AA BA CA DA
+ % to
+ % DA CA BA AA
+ % DB CB BB AB
+ % DC CC BC AC
+ % DD CD BD AD
+ %
+ \let\P@AA=\pgfplotspatchclass@bicubic@DD
+ \let\P@BA=\pgfplotspatchclass@bicubic@CD
+ \let\P@CA=\pgfplotspatchclass@bicubic@BD
+ \let\P@DA=\pgfplotspatchclass@bicubic@AD
+ \let\P@AB=\pgfplotspatchclass@bicubic@DC
+ \let\P@BB=\pgfplotspatchclass@bicubic@CC
+ \let\P@CB=\pgfplotspatchclass@bicubic@BC
+ \let\P@DB=\pgfplotspatchclass@bicubic@AC
+ \let\P@AC=\pgfplotspatchclass@bicubic@DB
+ \let\P@BC=\pgfplotspatchclass@bicubic@CB
+ \let\P@CC=\pgfplotspatchclass@bicubic@BB
+ \let\P@DC=\pgfplotspatchclass@bicubic@AB
+ \let\P@AD=\pgfplotspatchclass@bicubic@DA
+ \let\P@BD=\pgfplotspatchclass@bicubic@CA
+ \let\P@CD=\pgfplotspatchclass@bicubic@BA
+ \let\P@DD=\pgfplotspatchclass@bicubic@AA
+ \fi
+ \if D\Pcur
+ % the "AD" point needs to be streamed as first.
+ %
+ % Reorder
+ % AD BD CD DD
+ % AC BC CC DC
+ % AB BB CB DB
+ % AA BA CA DA
+ % to
+ % DD DC DB DA
+ % CD CC CB CA
+ % BD BC BB BA
+ % AD AC AB AA
+ %
+ \let\P@AA=\pgfplotspatchclass@bicubic@AD
+ \let\P@BA=\pgfplotspatchclass@bicubic@AC
+ \let\P@CA=\pgfplotspatchclass@bicubic@AB
+ \let\P@DA=\pgfplotspatchclass@bicubic@AA
+ \let\P@AB=\pgfplotspatchclass@bicubic@BD
+ \let\P@BB=\pgfplotspatchclass@bicubic@BC
+ \let\P@CB=\pgfplotspatchclass@bicubic@BB
+ \let\P@DB=\pgfplotspatchclass@bicubic@BA
+ \let\P@AC=\pgfplotspatchclass@bicubic@CD
+ \let\P@BC=\pgfplotspatchclass@bicubic@CC
+ \let\P@CC=\pgfplotspatchclass@bicubic@CB
+ \let\P@DC=\pgfplotspatchclass@bicubic@CA
+ \let\P@AD=\pgfplotspatchclass@bicubic@DD
+ \let\P@BD=\pgfplotspatchclass@bicubic@DC
+ \let\P@CD=\pgfplotspatchclass@bicubic@DB
+ \let\P@DD=\pgfplotspatchclass@bicubic@DA
+ \fi
+ \ifx\Pnextseq\pgfutil@empty
+ \else
+ % reverse the ordering. This means to transpose the
+ % matrix:
+ \pgfplotspatchclass@bicubic@transpose
+ \fi
+ %
+ % Step: convert to tensor bezier representation.
+ %
+ % Converting a 2d tensor product lagrangian interpoland to a
+ % 2d tensor product bezier interpoland can be achieved by
+ % means of 1d algorithms along LINES in the matrix.
+ %
+ % The underlying proof for this is related to the tensor
+ % product form: the U and V coordinates are orthogonal to each
+ % other, so we can redistribute all intermediate results. (I
+ % do not have the real proof, so this hand-waving argument has
+ % to be enough). I verified its results experimentally.
+ %
+ % Note that the underlying 1d operation is the same as for
+ % 'patch type=cubic spline' . We only need to apply it to all
+ % lines in U direction and afterwards to all lines in V
+ % direction.
+ %
+ \def\pgfplotspatchvertexaddXY@expanded##1\times{%
+ \edef\pgfplots@loc@TMPa{##1}%
+ \expandafter\pgfplotspatchvertexaddXY\pgfplots@loc@TMPa\times
+ }%
+ %
+ % this macro operates on \pgfplots@line{[ABCD]}, see below:
+ \def\pgfplots@apply@to@line{%
+ \pgfplotspatchvertexaccumstart
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{A}\times{-0.833333}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{B}\times{3}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{C}\times{-1.5}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{D}\times{0.3333333}%
+ \pgfplotspatchvertexfinish\pgfplots@controlpoint@A
+ %
+ \pgfplotspatchvertexaccumstart
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{A}\times{0.333333}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{B}\times{-1.5}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{C}\times{3}%
+ \pgfplotspatchvertexaddXY@expanded\pgfplots@line{D}\times{-0.833333}%
+ \pgfplotspatchvertexfinish\pgfplots@controlpoint@B
+ %
+ \expandafter\expandafter\expandafter\let\pgfplots@line{B}=\pgfplots@controlpoint@A
+ \expandafter\expandafter\expandafter\let\pgfplots@line{C}=\pgfplots@controlpoint@B
+ }%
+ %
+ \def\pgfplots@line##1{\csname P@##1A\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@##1B\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@##1C\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@##1D\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ %
+ \def\pgfplots@line##1{\csname P@A##1\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@B##1\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@C##1\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ \def\pgfplots@line##1{\csname P@D##1\endcsname}%
+ \pgfplots@apply@to@line
+ %
+ % OK. The tensor product representation is READY.
+ %
+ % Stream it to the shader. Note that the shader has a
+ % DIFFERENT ordering; it expects points in the cyclic ordering
+ %
+ % AA BA CA DA DB DC DD CD BD AD AC AB BB CB CC BC
+ %
+ % note furthermore that only the corners have "point meta" in
+ % this shading :-(
+ %
+ \expandafter\pgfplotspatchvertex\P@AA\endvertex
+ \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta
+ \pgfplotsaxisvisphasetransformpointmeta
+ \pgfplotslibrarysurfstreamcoord{\pgfqpoint\pgfplotspatchvertexx\pgfplotspatchvertexy}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@BA\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@CA\endvertex}{\pgfplotspointmetatransformed}%
+ \expandafter\pgfplotspatchvertex\P@DA\endvertex
+ \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta
+ \pgfplotsaxisvisphasetransformpointmeta
+ \pgfplotslibrarysurfstreamcoord{\pgfqpoint\pgfplotspatchvertexx\pgfplotspatchvertexy}{\pgfplotspointmetatransformed}%
+ %
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@DB\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@DC\endvertex}{\pgfplotspointmetatransformed}%
+ \expandafter\pgfplotspatchvertex\P@DD\endvertex
+ \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta
+ \pgfplotsaxisvisphasetransformpointmeta
+ \pgfplotslibrarysurfstreamcoord{\pgfqpoint\pgfplotspatchvertexx\pgfplotspatchvertexy}{\pgfplotspointmetatransformed}%
+ %
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@CD\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@BD\endvertex}{\pgfplotspointmetatransformed}%
+ \expandafter\pgfplotspatchvertex\P@AD\endvertex
+ \let\pgfplots@current@point@meta=\pgfplotspatchvertexmeta
+ \pgfplotsaxisvisphasetransformpointmeta
+ \pgfplotslibrarysurfstreamcoord{\pgfqpoint\pgfplotspatchvertexx\pgfplotspatchvertexy}{\pgfplotspointmetatransformed}%
+ %
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@AC\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@AB\endvertex}{\pgfplotspointmetatransformed}%
+ %
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@BB\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@CB\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@CC\endvertex}{\pgfplotspointmetatransformed}%
+ \pgfplotslibrarysurfstreamcoord{\expandafter\pgfplotspointpatchvertex\P@BC\endvertex}{\pgfplotspointmetatransformed}%
+ \endgroup
+ },
+ triangulate={%
+ \let\pgfplotsplothandlermesh@patchclass@=\pgfplotsplothandlermesh@patchclass
+ \def\pgfplotsplothandlermesh@patchclass{triangle}%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{new}%
+ % Ok. Now create a lot of triangles.
+ %
+ % FIXME: The ordering is not arbitrary (unless z buffer=sort is in effect).
+ %
+ % ##1: the row index of the cell to be triangulated (either A,B,or C)
+ % ##2: the col index of the cell to be triangulated (either A,B,or C)
+ % ##3: the 1. 'set edge visible' value for the first triangle
+ % ##4: the 2. 'set edge visible' value for the first triangle
+ % ##5: the 3. 'set edge visible' value for the first triangle
+ % ##6: the 1. 'set edge visible' value for the second triangle
+ % ##7: the 2. 'set edge visible' value for the second triangle
+ % ##8: the 3. 'set edge visible' value for the second triangle
+ \def\pgfplots@bicubic@triangulate@cell##1##2##3##4##5##6##7##8{%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}0##3%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}1##4%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}2##5%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@##1##2\endcsname}%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@\csname pgfpptchindexnext@##1\endcsname##2\endcsname}%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@\csname pgfpptchindexnext@##1\endcsname \csname pgfpptchindexnext@##2\endcsname\endcsname}%
+ %
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}0##6%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}1##7%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}2##8%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@##1\csname pgfpptchindexnext@##2\endcsname\endcsname}%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@##1##2\endcsname}%
+ \pgfplotsplothandlermesh@setnextvertex{\csname pgfplotspatchclass@bicubic@\csname pgfpptchindexnext@##1\endcsname \csname pgfpptchindexnext@##2\endcsname\endcsname}%
+ %
+ }%
+ %
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}01%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}10%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set edge visible}20%
+ \pgfplots@bicubic@triangulate@cell AA100 100%
+ \pgfplots@bicubic@triangulate@cell BA100 000%
+ \pgfplots@bicubic@triangulate@cell CA110 000%
+ %
+ \pgfplots@bicubic@triangulate@cell AB000 100%
+ \pgfplots@bicubic@triangulate@cell BB000 000%
+ \pgfplots@bicubic@triangulate@cell CB010 000%
+ %
+ \pgfplots@bicubic@triangulate@cell AC000 101%
+ \pgfplots@bicubic@triangulate@cell BC000 001%
+ \pgfplots@bicubic@triangulate@cell CC010 001%
+ \let\pgfplotsplothandlermesh@patchclass=\pgfplotsplothandlermesh@patchclass@
+ },%
+ serialize except vertices=\let\pgfplotsretval\pgfutil@empty,%
+ deserialize except vertices=,
+ get pdf shading type=7,
+ get num vertices=16,
+ get num cdata vertices=4,
+}%
+
+% Transpose a bicubic matrix (4x4).
+%
+% Reorder
+% AD BD CD DD
+% AC BC CC DC
+% AB BB CB DB
+% AA BA CA DA
+% to
+% DA DB DC DD
+% CA CB CC CD
+% BA BB BC BD
+% AA AB AC AD
+\def\pgfplotspatchclass@bicubic@transpose{%
+ \pgfplotsutil@swap\P@AB\P@BA
+ \pgfplotsutil@swap\P@CA\P@AC
+ \pgfplotsutil@swap\P@DA\P@AD
+ \pgfplotsutil@swap\P@CB\P@BC
+ \pgfplotsutil@swap\P@BD\P@DB
+ \pgfplotsutil@swap\P@DC\P@CD
+}
+\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots.lua b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots.lua
new file mode 100644
index 00000000000..8242222e8d6
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/pgfplots/lua/pgfplots.lua
@@ -0,0 +1,30 @@
+
+pgfplotsGetLuaBinaryStringFromCharIndicesChunkSize = 7000;
+
+-- Takes a table containing an arbitrary number of integers in the range 0..255 and converts it
+-- into a binary stream of the corresponding binary chars.
+--
+-- @param charIndices a table containing 0...N arguments; each in the range 0..255
+--
+-- @return a string containing binary content, one byte for each input integer.
+function pgfplotsGetLuaBinaryStringFromCharIndices(charIndices)
+ -- unpack extracts only the indices (we can't provide a table to string.char).
+ -- note that pdf.immediateobj has been designed to avoid sanity checking for invalid UTF strings -
+ -- in other words: it accepts binary strings.
+ --
+ -- unfortunately, this here fails for huge input tables:
+ -- pgfplotsretval=string.char(unpack(charIndices));
+ -- we have to create it incrementally using chunks:
+ local len = #charIndices;
+ local chunkSize = pgfplotsGetLuaBinaryStringFromCharIndicesChunkSize;
+ local buf = {};
+ -- ok, append all full chunks of chunkSize first:
+ local numFullChunks = math.floor(len/chunkSize);
+ for i = 0, numFullChunks-1, 1 do
+ table.insert(buf, string.char(unpack(charIndices, 1+i*chunkSize, (i+1)*chunkSize)));
+ end
+ -- append the rest:
+ table.insert(buf, string.char(unpack(charIndices, 1+numFullChunks*chunkSize)));
+ return table.concat(buf);
+end
+
diff --git a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
index 91677f6e15e..54c29ff4959 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex
@@ -58,7 +58,7 @@
% just make sure no-one complaints if manual example are used without
% booktabs loaded:
-\pgfutil@ifundefined{toprule}{%
+\pgfutil@IfUndefined{toprule}{%
\def\toprule{\pgfplots@assert@LaTeX@package@loaded{booktabs}{\string\toprule}}%
\def\midrule{\pgfplots@assert@LaTeX@package@loaded{booktabs}{\string\midrule}}%
\def\bottomrule{\pgfplots@assert@LaTeX@package@loaded{booktabs}{\string\bottomrule}}%
@@ -2955,7 +2955,7 @@
\pgfplotstable@copy@globalbuffers@to{#1}%
}%
-\pgfutil@ifundefined{pgfcalendardatetojulian}{%
+\pgfutil@IfUndefined{pgfcalendardatetojulian}{%
\def\pgfcalendardatetojulian#1#2{\pgfplots@error{Sorry, you need to use \string\usepackage{pgfcalendar} before using date specific methods}}%
}{}%
\endinput
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
index 48bb178afbc..3c8fde67285 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
@@ -25,7 +25,7 @@
% #2: for normal processing.
\def\pgfplots@ifneedspgfcompabitibilitycode@has@pgf@one@zero@zero#1#2{%
%\pgfkeysifdefined{/pgf/number format/sci precision/.@cmd}{#2}{#1}%
- \pgfutil@ifundefined{pgfplothandlerjumpmarkmid}{#1}{#2}%
+ \pgfutil@ifundefined{pgfmathprintnumber@RELATIVE@choice@roundtofixed}{#1}{#2}%
}%
\let\pgfplots@ifneedspgfcompabitibilitycode=\pgfplots@ifneedspgfcompabitibilitycode@has@pgf@one@zero@zero
@@ -39,8 +39,8 @@
\input pgfplotsoldpgfsupp_pgfmathfloat.code.tex
\input pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
\input pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
- \input pgfplotsoldpgfsupp_pgfcorelayers.code.tex
\input pgfplotsoldpgfsupp_pgfcorescopes.code.tex
+ \input pgfplotsoldpgfsupp_pgfcorelayers.code.tex
}%
{%
\pgfplots@iffileexists{pgflibraryfpu.code.tex}{%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
index 6a9a4cc2b5a..f9f260b1d7d 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex
@@ -8,6 +8,26 @@
}{}%
}
+% check if \endtikzpicture deals with layerlist:
+\expandafter\pgfutil@in@\expandafter\pgf@remember@layerlist@globally\expandafter{\endtikzpicture}%
+\ifpgfutil@in@
+\else
+ \def\endtikzpicture{%
+ \tikz@atend@picture%
+ \global\let\pgf@shift@baseline@smuggle=\pgf@baseline%
+ \global\let\pgf@trimleft@final@smuggle=\pgf@trimleft%
+ \global\let\pgf@trimright@final@smuggle=\pgf@trimright%
+ \global\let\pgf@remember@smuggle=\ifpgfrememberpicturepositiononpage%
+ \pgf@remember@layerlist@globally
+ \endscope%
+ \let\pgf@baseline=\pgf@shift@baseline@smuggle%
+ \let\pgf@trimleft=\pgf@trimleft@final@smuggle%
+ \let\pgf@trimright=\pgf@trimright@final@smuggle%
+ \let\ifpgfrememberpicturepositiononpage=\pgf@remember@smuggle%
+ \pgf@restore@layerlist@from@global
+ \endpgfpicture}
+\fi
+
% ======================================================
% compatibility with PGF 2.0
% ======================================================
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
index 5ad04db77bb..487856a5a01 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex
index bd8a45071ee..8379e1d4f1a 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex
index 5c9a407b9c6..e2b22b73890 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
index c933914a9c4..3afa39b2a2d 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
@@ -712,8 +712,6 @@
\or
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%
\or
- \pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}%
- \or
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7}%
\or
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
index 51a3f911a57..cdbb8e0b541 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
index be3a2179c6b..efb75e10b9c 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
index 22127f8f1d3..6801918d200 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
@@ -27,7 +27,7 @@
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.
-\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.16 2011/12/28 18:51:18 ludewich Exp $
+\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/libraries/pgflibraryplothandlers.code.tex,v 1.17 2012/09/11 20:03:46 ludewich Exp $
\newif\ifpgf@plot@started
@@ -395,12 +395,19 @@
\pgfplotyzerolevelstreamconstant{0pt}%
\def\pgfplotbarwidth{\pgfkeysvalueof{/pgf/bar width}}
+\def\pgfplotbarshift{\pgfkeysvalueof{/pgf/bar shift}}
\pgfqkeys{/pgf}{%
bar width/.initial=10pt,
bar shift/.initial=0pt,
bar interval width/.initial=1,
bar interval shift/.initial=0.5,
+ %
+ % hook which is executed right before a new bar is begun.
+ at begin bar/.initial=,
+ % hook which is executed right after a bar path has been finished.
+ % In this context, the bar's path has not been used.
+ at end bar/.initial=,
}
% This handler places a rectangle at each point in the plot stream, a
@@ -422,13 +429,14 @@
\global\let\pgf@plotstreamend=\pgfplotyzerolevelstreamend%
\pgfmathparse{\pgfplotbarwidth}%
\xdef\pgfplotbarwidth@{\pgfmathresult pt}%
- \pgfmathparse{\pgfkeysvalueof{/pgf/bar shift}}%
+ \pgfmathparse{\pgfplotbarshift}%
\xdef\pgfplotbarshift@{\pgfmathresult pt}%
\pgfplotyzerolevelstreamstart
}%
}
\def\pgf@plot@ybar@handler#1{%
+ \pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
\pgf@ya=\pgf@y
\expandafter\pgf@xb\pgfplotbarwidth@\relax
@@ -443,6 +451,7 @@
\pgfpathrectangle
{\pgfqpoint{\pgf@xc}{\pgf@yb}}%
{\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+ \pgfkeysvalueof{/pgf/at end bar}%
}
% This handler places a rectangle at each point in the plot stream, a
@@ -464,13 +473,14 @@
\global\let\pgf@plotstreamend=\pgfplotxzerolevelstreamend%
\pgfmathparse{\pgfplotbarwidth}%
\xdef\pgfplotbarwidth@{\pgfmathresult pt}%
- \pgfmathparse{\pgfkeysvalueof{/pgf/bar shift}}%
+ \pgfmathparse{\pgfplotbarshift}%
\xdef\pgfplotbarshift@{\pgfmathresult pt}%
\pgfplotxzerolevelstreamstart
}%
}
\def\pgf@plot@xbar@handler#1{%
+ \pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
\pgf@ya=\pgf@x
\expandafter\pgf@xb\pgfplotbarwidth@\relax
@@ -485,6 +495,7 @@
\pgfpathrectangle
{\pgfqpoint{\pgf@yb}{\pgf@xc}}%
{\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+ \pgfkeysvalueof{/pgf/at end bar}%
}
% This handler is a variant of \pgfplothandlerybar which works with
@@ -540,6 +551,7 @@
\global\let\pgf@plotstreampoint=\pgf@plot@ybarinterval@handler%
}
\def\pgf@plot@ybarinterval@handler#1{%
+ \pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
\pgf@ya=\pgf@plot@barinterval@bar
\xdef\pgf@plot@barinterval@bar{\the\pgf@y}%
@@ -558,6 +570,7 @@
\pgfpathrectangle
{\pgfqpoint{\pgf@xc}{\pgf@yb}}%
{\pgfqpoint{\pgf@xb}{\pgf@ya}}%
+ \pgfkeysvalueof{/pgf/at end bar}%
}
% Like \pgfplothandlerybarinterval but for xbar.
@@ -581,6 +594,7 @@
\global\let\pgf@plotstreampoint=\pgf@plot@xbarinterval@handler%
}
\def\pgf@plot@xbarinterval@handler#1{%
+ \pgfkeysvalueof{/pgf/at begin bar}%
\pgf@process{#1}%
\pgf@ya=\pgf@plot@barinterval@bar
\xdef\pgf@plot@barinterval@bar{\the\pgf@x}%
@@ -599,6 +613,7 @@
\pgfpathrectangle
{\pgfqpoint{\pgf@yb}{\pgf@xc}}%
{\pgfqpoint{\pgf@ya}{\pgf@xb}}%
+ \pgfkeysvalueof{/pgf/at end bar}%
}
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
index d553f4c4272..0532c6876b2 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
index c9eacad8bf6..d7df866355c 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
index 51a4122f811..8b0770245c8 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
index 4a795f89cd5..10aeaa849fb 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
@@ -932,6 +932,11 @@
\let\pgfmathround@@orig=\pgfmathround@
+% 2 = compatible
+% 0 = no
+% 1 = yes
+\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed{2}%
+
\newif\ifpgfmathprintnumber@thousand@sep@in@fractional
\pgfkeys{%
/pgf/number format/.is family,
@@ -940,6 +945,10 @@
sci/.code= \pgfmath@set@number@printer{pgfmathprintnumber@SCI},
std/.code= {\pgfmath@set@number@printer{pgfmathprintnumber@STD}\pgfmathprintnumber@STD@setparam{#1}},
std/.default=,%
+ relative round mode/.is choice,
+ relative round mode/fixed/.code={\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed{1}},
+ relative round mode/mantissa/.code={\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed{0}},
+ relative round mode/compatible/.code={\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed{2}},
% relative={<exponent base 10>}
relative/.code= {%
\pgfmath@set@number@printer{pgfmathprintnumber@RELATIVE}%
@@ -948,7 +957,9 @@
\let\pgfmathprintnumber@RELATIVE@param=\pgfmathresult
},%
relative/.value required,
+ relative*/.style={/pgf/number format/relative={#1},/pgf/number format/relative round mode=fixed},
every relative/.style=std,
+ relative style/.style={/pgf/number format/every relative/.append style={#1}},
fixed relative/.code= \pgfmath@set@number@printer{pgfmathprintnumber@FIXED@RELATIVE},
int detect/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@DETECT},
int trunc/.code= \pgfmath@set@number@printer{pgfmathprintnumber@INT@TRUNC},
@@ -982,13 +993,13 @@
sci precision=,
fixed default/.code= {\let\pgfmathprintnumber@fixed@style=\pgfmathprintnumber@fixed@styleDEFAULT},
set decimal separator/.initial=,
- dec sep/.style={/pgf/number format/set decimal separator=#1},
+ dec sep/.style={/pgf/number format/set decimal separator={#1}},
@dec sep mark/.initial=,
@sci exponent mark/.initial=,
set thousands separator/.initial=,
1000 sep in fractionals/.is if=pgfmathprintnumber@thousand@sep@in@fractional,
1000 sep in fractionals/.default=true,
- 1000 sep/.style={/pgf/number format/set thousands separator=#1},
+ 1000 sep/.style={/pgf/number format/set thousands separator={#1}},
min exponent for 1000 sep/.initial=0,
use period/.style= {/pgf/number format/set decimal separator={.},/pgf/number format/set thousands separator={{{,}}}},
use comma/.style= {/pgf/number format/set decimal separator={{{,}}},/pgf/number format/set thousands separator={.}},
@@ -1103,6 +1114,11 @@
\expandafter\pgfmathprintnumber@RELATIVE@issci\pgfmathresult\relax
}
+\def\pgfmathprintnumber@RELATIVE@choice@roundtofixed@warn{%
+ \immediate\write16{! Package pgf warning: the use of /pgf/number format/relative is discouraged (buggy). Please use 'relative*' instead or type \string\pgfkeys{/pgf/number format/relative round mode=fixed} into your preamble.}%
+ \global\let\pgfmathprintnumber@RELATIVE@choice@roundtofixed@warn=\relax
+}
+
\def\pgfmathprintnumber@RELATIVE@issci#1#2e#3\relax{%
\begingroup
% format X / 10^{relative}:
@@ -1110,16 +1126,35 @@
\advance\c@pgf@counta by-\pgfmathprintnumber@RELATIVE@param\relax
\pgfmathfloatcreate{#1}{#2}{\the\c@pgf@counta}%
% OK, round it to the desired precision:
- \ifnum\c@pgf@counta>0
- % hm. for positive exponents, we should round the
- % mantissa rather than only the fractional part.
- \expandafter\pgfmathfloatround\expandafter{\pgfmathresult}%
- \else
- % negative exponent -> round fixed representation:
+ \if0\pgfmathprintnumber@RELATIVE@choice@roundtofixed
+ % relative round mode=mantissa
+ \def\b@round@fixed{0}%
+ \else
+ \if1\pgfmathprintnumber@RELATIVE@choice@roundtofixed
+ % relative round mode=fixed
+ \def\b@round@fixed{1}%
+ \else
+ \pgfmathprintnumber@RELATIVE@choice@roundtofixed@warn
+ % relative round mode=compatible
+ \ifnum\c@pgf@counta>0
+ % hm. for positive exponents, we should round the
+ % mantissa rather than only the fractional part.
+ \def\b@round@fixed{0}%
+ \else
+ % negative exponent -> round fixed representation:
+ \def\b@round@fixed{1}%
+ \fi
+ \fi
+ \fi
+ \if1\b@round@fixed
+ % round fixed representation:
\pgfmathfloattofixed\pgfmathresult
\expandafter\pgfmathroundto\expandafter{\pgfmathresult}%
\pgfmathfloatparsenumber{\pgfmathresult}%
\pgfmathfloatroundhasperiodtrue% make sure the code below works:
+ \else
+ % round the mantissa:
+ \expandafter\pgfmathfloatround\expandafter{\pgfmathresult}%
\fi
% Now, compute result * 10^{relative} and format the result:
\pgfmathfloattoregisterstok\pgfmathresult\pgfmathfloat@a@S\pgfmathfloat@a@Mtok\pgfmathfloat@a@E
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
index cbd3b957c6e..7f42aaec1b8 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternal.sty
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex
index 17feb576361..eabbcad77b7 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
index aca706b459f..49a7f10f8a4 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
+%%% Date of this copy: Sa 22. Sep 18:44:37 CEST 2012 %%%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
index 7bf4e86b27a..7edbb15a4c3 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.code.tex
@@ -65,11 +65,14 @@
\newdimen\pgfplots@zmax@reg
\newif\ifpgfplots@warn@for@filter@discards
\newif\ifpgfplots@isuniformtick
+\newif\ifpgfplotsplothandlermesh@patch@type@sampling
\newif\ifpgfplots@clip@limits
\newif\ifpgfplots@clip
\newif\ifpgfplots@plot@coords@mathparser
\pgfplots@plot@coords@mathparsertrue
\newif\ifpgfplots@enlargelimits
+\newif\ifpgfplots@enlargelimits@respect@figure@size
+\pgfplots@enlargelimits@respect@figure@sizetrue
\newif\ifpgfplots@enlargelimits@rel@thresh
\newif\ifpgfplots@enlargelimits@auto
\newif\ifpgfplots@tickshow
@@ -138,7 +141,7 @@
% Invokes '#2' if a cycle list named '#1' exists and '#3' if not.
\long\def\pgfplotsifcyclelistexists#1#2#3{%
- \pgfutil@ifundefined{pgfp@cyclist@\string#1@}{#3}{#2}%
+ \pgfutil@IfUndefined{pgfp@cyclist@\string#1@}{#3}{#2}%
}%
% Creates a named plot cycle list.
@@ -1183,12 +1186,6 @@
/pgfplots/scale ticks below exponent/.store in= \pgfplots@scale@ticks@below@exponent,
/pgfplots/scale ticks below exponent/.belongs to family=/pgfplots/tick,
/pgfplots/scale ticks below exponent=-1,
- /pgfplots/subtickwidth/.store in= \pgfplots@subtickwidth,
- /pgfplots/subtickwidth/.belongs to family=/pgfplots/tick,
- /pgfplots/subtickwidth=0.1cm,
- /pgfplots/tickwidth/.store in= \pgfplots@tickwidth,
- /pgfplots/tickwidth/.belongs to family=/pgfplots/tick,
- /pgfplots/tickwidth=0.15cm,
/pgfplots/minor x tick num/.initial=0,
/pgfplots/minor x tick num/.belongs to family=/pgfplots/tick,
/pgfplots/minor y tick num/.initial=0,
@@ -1213,10 +1210,14 @@
/pgfplots/minor ztick={#1},
},
/pgfplots/minor tick/.belongs to family=/pgfplots/tick,
- /pgfplots/minor tick length/.estore in=\pgfplots@subtickwidth,
+ %
+ /pgfplots/subtickwidth/.style= {/pgfplots/minor tick length={#1}},
+ /pgfplots/tickwidth/.style= {/pgfplots/major tick length={#1}},
/pgfplots/minor tick length/.belongs to family=/pgfplots/tick,
- /pgfplots/major tick length/.estore in=\pgfplots@tickwidth,
+ /pgfplots/minor tick length/.initial=0.1cm,
/pgfplots/major tick length/.belongs to family=/pgfplots/tick,
+ /pgfplots/major tick length/.initial=0.15cm,
+ %
/pgfplots/max space between ticks/.estore in=\axisdefaulttickwidth,
/pgfplots/max space between ticks/.belongs to family=/pgfplots/tick,
/pgfplots/max space between ticks=35,% the maximum space between adjacent ticks (in pt, but don't specify the unit 'pt')
@@ -1880,7 +1881,7 @@
/pgfplots/prefix/.code={\pgfkeysalso{/tikz/prefix={#1}}},
/pgfplots/raw gnuplot/.code={\pgfkeysalso{/tikz/raw gnuplot={#1}}},
/pgfplots/parametric/.code={\pgfkeysalso{/tikz/parametric={#1}}},%
- %
+ %
/pgfplots/width/.initial=,%
/pgfplots/width/.belongs to family=/pgfplots,
/pgfplots/height/.initial=,%
@@ -1909,6 +1910,7 @@
/pgfplots/enlarge z limits=#1,%
},%
/pgfplots/enlargelimits/.default=true,
+ /pgfplots/enlargelimits respects figure size/.is if=pgfplots@enlargelimits@respect@figure@size,
/pgfplots/update limits/.is if=pgfplots@bb@isactive,
/pgfplots/x/.initial=,% is implicitly set by 'width' and/or '\axisdefaultwidth'
/pgfplots/x/.belongs to family=/pgfplots,
@@ -2674,14 +2676,14 @@
% FIXME: simplify this code! It is just a replication of the default error stuff together with an xshift!
\pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}%
\pgfkeysgetvalue{/pgfplots/error bars/error mark options}{\pgfplotserrorbarsmarkopts}%
- \draw[xshift={\pgfkeysvalueof{/pgf/bar shift}}]
+ \draw[xshift={\pgfplotbarshift}]
##1 -- ##2 node[pos=1,sloped,allow upside down] {%
\expandafter\tikz\expandafter[\pgfplotserrorbarsmarkopts]{%
\expandafter\pgfuseplotmark\expandafter{\pgfplotserrorbarsmark}%
\pgfusepath{stroke}}%
};
},%
- /pgfplots/every node near coord/.append style={xshift={\pgfkeysvalueof{/pgf/bar shift}}},%
+ /pgfplots/every node near coord/.append style={xshift={\pgfplotbarshift}},%
/tikz/ybar,
},
/pgfplots/ybar/.default=2pt,
@@ -2706,14 +2708,14 @@
% FIXME: simplify this code! It is just a replication of the default error stuff together with an xshift!
\pgfkeysgetvalue{/pgfplots/error bars/error mark}{\pgfplotserrorbarsmark}%
\pgfkeysgetvalue{/pgfplots/error bars/error mark options}{\pgfplotserrorbarsmarkopts}%
- \draw[yshift={\pgfkeysvalueof{/pgf/bar shift}}]
+ \draw[yshift={\pgfplotbarshift}]
##1 -- ##2 node[pos=1,sloped,allow upside down] {%
\expandafter\tikz\expandafter[\pgfplotserrorbarsmarkopts]{%
\expandafter\pgfuseplotmark\expandafter{\pgfplotserrorbarsmark}%
\pgfusepath{stroke}}%
};
},%
- /pgfplots/every node near coord/.append style={yshift={\pgfkeysvalueof{/pgf/bar shift}}},%
+ /pgfplots/every node near coord/.append style={yshift={\pgfplotbarshift}},%
/tikz/xbar,
},
/pgfplots/xbar/.default=2pt,
@@ -2817,6 +2819,7 @@
/pgfplots/plot graphics/auto adjust axis/.is if=pgfplots@plot@graphics@autoadjustaxis,
/pgfplots/plot graphics/auto adjust axis=true,
/pgfplots/plot graphics/snap z/.initial=0.02,
+ % possible values: debug=<empty>|false|true|visual
/pgfplots/plot graphics/debug/.initial=,
/pgfplots/plot graphics/debug/.default=true,
/pgfplots/plot graphics/squeeze tol/.initial=2pt,
@@ -2892,6 +2895,7 @@
\pgfkeysalso{/pgfplots/point meta/explicit}%
},
/pgfplots/patch type/.initial=,
+ /pgfplots/patch type sampling/.is if=pgfplotsplothandlermesh@patch@type@sampling,
/pgfplots/patch internal depth/.is if=pgfplotsplothandlermesh@internaldepth,
/pgfplots/patch internal depth=true,
/pgfplots/patch to triangles/.is choice,
@@ -3335,6 +3339,7 @@
/pgfplots/compat/anchors/1.5/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/1.5.1/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/1.6/.style= {/pgfplots/compat/anchors/1.3},%
+ /pgfplots/compat/anchors/1.7/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/newest/.style= {/pgfplots/compat/anchors/1.3},%
/pgfplots/compat/anchors/default/.style={/pgfplots/compat/anchors/1.3},%
%
@@ -3345,6 +3350,7 @@
/pgfplots/compat/empty line/1.5/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/1.5.1/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/1.6/.style= {/pgfplots/compat/empty line/1.4},%
+ /pgfplots/compat/empty line/1.7/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/newest/.style= {/pgfplots/compat/empty line/1.4},%
/pgfplots/compat/empty line/default/.style= {/pgfplots/compat/empty line/1.4},%
%
@@ -3355,6 +3361,7 @@
/pgfplots/compat/path replacement/1.5/.style= {/pgfplots/compat/path replacement/pre 1.3},%
/pgfplots/compat/path replacement/1.5.1/.code= {\pgfplots@path@replace@ellipsetrue},%
/pgfplots/compat/path replacement/1.6/.style= {/pgfplots/compat/path replacement/1.5.1},
+ /pgfplots/compat/path replacement/1.7/.style= {/pgfplots/compat/path replacement/1.5.1},
/pgfplots/compat/path replacement/newest/.style= {/pgfplots/compat/path replacement/1.5.1},%
/pgfplots/compat/path replacement/default/.style= {/pgfplots/compat/path replacement/pre 1.3},%
%ellipse/.is if=pgfplots@path@replace@ellipse,
@@ -3370,6 +3377,7 @@
/pgfplots/compat/labels/1.5/.style= {/pgfplots/compat/labels/1.3},%
/pgfplots/compat/labels/1.5.1/.style= {/pgfplots/compat/labels/1.3},%
/pgfplots/compat/labels/1.6/.style= {/pgfplots/compat/labels/1.3},%
+ /pgfplots/compat/labels/1.7/.style= {/pgfplots/compat/labels/1.3},%
/pgfplots/compat/labels/newest/.style= {/pgfplots/compat/labels/1.3},%
/pgfplots/compat/labels/default/.style= {/pgfplots/compat/labels/pre 1.3},% maintain backwards compatibility for labels :-(
%
@@ -3394,6 +3402,7 @@
\def\pgfplots@compat@scaling@coordmath{float}%
\def\pgfplots@compat@scaling@coordmath@final{float}%
},
+ /pgfplots/compat/scaling/1.7/.style={/pgfplots/compat/scaling/1.6},
/pgfplots/compat/scaling/newest/.style={/pgfplots/compat/scaling/1.6},
/pgfplots/compat/scaling/default/.style={/pgfplots/compat/scaling/1.4},
%
@@ -3404,6 +3413,7 @@
/pgfplots/compat/scale mode/1.5/.style= {/pgfplots/compat/scale mode/pre 1.3},
/pgfplots/compat/scale mode/1.5.1/.style= {/pgfplots/compat/scale mode/pre 1.3},
/pgfplots/compat/scale mode/1.6/.code=\def\pgfplots@compat@scale@mode@compatible@mode{0},
+ /pgfplots/compat/scale mode/1.7/.style={/pgfplots/compat/scale mode/1.6},
/pgfplots/compat/scale mode/newest/.style={/pgfplots/compat/scale mode/1.6},
/pgfplots/compat/scale mode/default/.style={/pgfplots/compat/scale mode/1.5},
%
@@ -3415,6 +3425,7 @@
/pgfplots/compat/plot3graphics/1.5/.code= {\def\b@pgfplots@compat@plot@graphics@threedim{1}},%
/pgfplots/compat/plot3graphics/1.5.1/.style= {/pgfplots/compat/plot3graphics/1.5},%
/pgfplots/compat/plot3graphics/1.6/.code= {\def\b@pgfplots@compat@plot@graphics@threedim{2}},%
+ /pgfplots/compat/plot3graphics/1.7/.style= {/pgfplots/compat/plot3graphics/1.6},%
/pgfplots/compat/plot3graphics/newest/.style= {/pgfplots/compat/plot3graphics/1.6},%
/pgfplots/compat/plot3graphics/default/.style= {/pgfplots/compat/plot3graphics/1.5},%
%
@@ -3445,6 +3456,16 @@
%
% Sorry.
%
+ /pgfplots/compat/bar width by units/.is choice,
+ /pgfplots/compat/bar width by units/pre 1.3/.code= {\def\b@pgfplots@compat@bar@width@units{1}},%
+ /pgfplots/compat/bar width by units/1.3/.style= {/pgfplots/compat/bar width by units/pre 1.3},
+ /pgfplots/compat/bar width by units/1.4/.style= {/pgfplots/compat/bar width by units/pre 1.3},%
+ /pgfplots/compat/bar width by units/1.5/.style= {/pgfplots/compat/bar width by units/pre 1.3},%
+ /pgfplots/compat/bar width by units/1.5.1/.style= {/pgfplots/compat/bar width by units/pre 1.3},%
+ /pgfplots/compat/bar width by units/1.6/.style= {/pgfplots/compat/bar width by units/pre 1.3},%
+ /pgfplots/compat/bar width by units/1.7/.code= {\def\b@pgfplots@compat@bar@width@units{0}},%
+ /pgfplots/compat/bar width by units/newest/.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/general/.is choice,
/pgfplots/compat/general/pre 1.3/.style={/pgfplots/log origin=infty},%
@@ -3453,13 +3474,14 @@
/pgfplots/compat/general/1.5/.style= {/pgfplots/compat/general/newest},%
/pgfplots/compat/general/1.5.1/.style= {/pgfplots/compat/general/newest},%
/pgfplots/compat/general/1.6/.style= {/pgfplots/compat/general/newest},%
+ /pgfplots/compat/general/1.7/.style= {/pgfplots/compat/general/newest},%
/pgfplots/compat/general/newest/.style= {/pgfplots/log origin=0},
/pgfplots/compat/general/default/.style={/pgfplots/compat/general/newest},
%
/pgfplots/compat/show suggested version/.is if=pgfplots@show@suggested@version,
/pgfplots/compat/show suggested version=true,
/pgfplots/compat/current/.initial=,
- /pgfplots/compat/mostrecent/.initial=1.6,
+ /pgfplots/compat/mostrecent/.initial=1.7,
/pgfplots/compat/.style={%
% ATTENTION: *every* /pgfplots/compat/ setting needs to accept
% the same choices due to this construction:
@@ -3472,6 +3494,7 @@
/pgfplots/compat/general=#1,%
/pgfplots/compat/path replacement=#1,%
/pgfplots/compat/plot3graphics=#1,%
+ /pgfplots/compat/bar width by units=#1,%
},%
/pgfplots/compat/.default=pre 1.3,% this is used if you type '\pgfplotsset{compat}' without value
/pgfplots/compat=default,% this is the initial config.
@@ -3552,6 +3575,10 @@
},%
}
+% backwards compatibility:
+\def\pgfplots@tickwidth{\pgfkeysvalueof{/pgfplots/major tick length}}%
+\def\pgfplots@subtickwidth{\pgfkeysvalueof{/pgfplots/minor tick length}}%
+
\pgfkeysgetvalue{/pgfplots/colorbar/draw/.@cmd}\pgfplots@colorbar@draw@defaultimpl
% call
@@ -4593,7 +4620,7 @@
\fi
}
-\pgfutil@ifundefined{AtBeginDocument}{}{%
+\pgfutil@IfUndefined{AtBeginDocument}{}{%
\AtBeginDocument{%
\let\pgfplots@original@LaTeX@label@loadtime=\label
}%
@@ -4613,7 +4640,7 @@
\string\protect
\string\csname\space #3#2\string\endcsname
}%
- \pgfutil@ifundefined{hyper@makecurrent}{}{%
+ \pgfutil@IfUndefined{hyper@makecurrent}{}{%
\hyper@makecurrent{pgfplotslink}%
\hyper@anchorstart{\@currentHref}{}\hyper@anchorend
\pgfplotsutil@advancestringcounter@global\c@pgfplots@label
@@ -4623,7 +4650,7 @@
% \label in sub
\let\sf@@memsub@label=\pgfplots@original@LaTeX@label@loadtime
%
- \pgfutil@ifundefined{label}{%
+ \pgfutil@IfUndefined{label}{%
}{%
\def\pgfplots@loc@TMPa{\label #1}%
\expandafter\pgfplots@loc@TMPa\expandafter{#2}% the \expandafter is a convenience method; the name should be expandable anyway
@@ -4638,8 +4665,8 @@
\pgfplots@texdist@protect\pgfplotslegendfromname@{#1}%
}%
\def\pgfplotslegendfromname@#1{%
- \pgfutil@ifundefined{pgfplots@legend@to@name@#1}{%
- \pgfutil@ifundefined{ref}{%
+ \pgfutil@IfUndefined{pgfplots@legend@to@name@#1}{%
+ \pgfutil@IfUndefined{ref}{%
\pgfplots@warning{There is no `legend to name=#1', sorry. I am skipping it}%
\string\pgfplotslegendfromname{#1}: ??%
}{%
@@ -4654,8 +4681,8 @@
\pgfplots@texdist@protect\pgfplotscolorbarfromname@{#1}%
}%
\def\pgfplotscolorbarfromname@#1{%
- \pgfutil@ifundefined{pgfplots@colorbar@to@name@#1}{%
- \pgfutil@ifundefined{ref}{%
+ \pgfutil@IfUndefined{pgfplots@colorbar@to@name@#1}{%
+ \pgfutil@IfUndefined{ref}{%
\pgfplots@warning{There is no `colorbar to name=#1', sorry. I am skipping it}%
\string\pgfplotscolorbarfromname{#1}: ??%
}{%
@@ -4670,8 +4697,8 @@
\pgfplots@texdist@protect\pgfplotsplotfromname@{#1}%
}%
\def\pgfplotsplotfromname@#1{%
- \pgfutil@ifundefined{pgfplots@show@ref@#1}{%
- \pgfutil@ifundefined{ref}{%
+ \pgfutil@IfUndefined{pgfplots@show@ref@#1}{%
+ \pgfutil@IfUndefined{ref}{%
\pgfplots@warning{There is no \string\addplot\space label `#1', sorry. I am skipping it}%
\string\pgfplotsplotfromname{#1}: ??%
}{%
@@ -4683,7 +4710,7 @@
}%
\def\pgfplots@ifintikzpicture#1#2{%
- \pgfutil@ifundefined{filldraw}{#2}{#1}%
+ \ifpgfpicture #1\else #2\fi
}%
% DEPRECATED.
@@ -4761,19 +4788,43 @@
}{}%
\fi
}%
+
+\def\pgfplots@enlargelimits@rel@unitserror#1{%
+ \pgfplots@error{enlarge limits only supports values with units for 'abs=#1' and/or 'abs value=#1'. Ignoring unit}%
+}%
\pgfkeysdef{/pgfplots/@enlargelimits/value}{%
\pgfmathparse{#1}%
+ \ifpgfmathunitsdeclared
+ \pgfplots@enlargelimits@rel@unitserror{#1}%
+ \fi
\let\pgfplots@enlargelimits@relthresh=\pgfmathresult
\let\pgfplots@enlargelimits@absthresh=\pgfutil@empty
}%
\pgfkeysdef{/pgfplots/@enlargelimits/rel}{\pgfkeysalso{true,value={#1}}}%
\pgfkeysdef{/pgfplots/@enlargelimits/abs value}{%
\begingroup
- \pgfplotscoordmath{\pgfplots@enlargelimits@curaxis}{datascaletrafo set shift}{0}%
- \expandafter\csname pgfplotstransformcoordinate\pgfplots@enlargelimits@curaxis\endcsname{#1}%
- \pgfmath@smuggleone\pgfmathresult
+ \ifpgfplots@usefpu
+ \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
+ \fi
+ \pgfmathparse{#1}%
+ \xdef\pgfplots@glob@TMPa{%
+ \ifpgfmathunitsdeclared
+ \noexpand\pgfmathunitsdeclaredtrue
+ \else
+ \noexpand\pgfmathunitsdeclaredfalse
+ \fi
+ \noexpand\def\noexpand\pgfmathresult{\pgfmathresult}%
+ }%
\endgroup
- \let\pgfplots@enlargelimits@absthresh=\pgfmathresult
+ \pgfplots@glob@TMPa
+ \ifpgfmathunitsdeclared
+ \edef\pgfplots@enlargelimits@absdimension{\pgfmathresult pt}%
+ \let\pgfplots@enlargelimits@absthresh=\pgfutil@empty
+ \else
+ \let\pgfplots@enlargelimits@absdimension=\pgfutil@empty
+ \csname pgfplotstransformdirection\pgfplots@enlargelimits@curaxis\endcsname{\pgfmathresult}%
+ \let\pgfplots@enlargelimits@absthresh=\pgfmathresult
+ \fi
\let\pgfplots@enlargelimits@relthresh=\pgfutil@empty
}%
\pgfkeysdef{/pgfplots/@enlargelimits/abs}{\pgfkeysalso{true,abs value={#1}}}%
@@ -4781,10 +4832,31 @@
\def\pgfplots@enlarge@limit@ifconfigured#1{%
\begingroup
+ % ATTENTION: this uses similar access patterns as
+ % \pgfplots@enlarge@limit@by@dimension
\def\bool@pgfplots@loc@enlargelimits@min{0}%
\def\bool@pgfplots@loc@enlargelimits@max{0}%
+ %
+ % we can either enlarge
+ % ... using a relative limit (like 0.1 -> 10%)
\def\pgfplots@enlargelimits@relthresh{0.1}% the default
+ % ...or an absolute limit ( like 4 units)
\let\pgfplots@enlargelimits@absthresh=\pgfutil@empty
+ % or an absolute dimension (like 1cm).
+ %
+ % Relative and absolute values are relatively simple: we only need to compute and
+ % add the changes to the already existing limits. The value with
+ % an absolute dimension is surprisingly complicated.
+ %
+ % The problem is: enlargelimits has to be computed before the
+ % image has been scaled into its final size. This is not merely a
+ % technical problem; this is how one wants it to be!
+ %
+ % The solution taken here is to communicate such an absolute
+ % dimension to the scaling routines. The scaling routines will
+ % handle the case; we don't change limits here.
+ %
+ \let\pgfplots@enlargelimits@absdimension=\pgfutil@empty
\def\pgfplots@enlargelimits@curaxis{#1}%
%
\pgfkeysgetvalue{/pgfplots/enlarge #1 limits}{\pgfplots@loc@TMPa}%
@@ -4803,13 +4875,230 @@
\pgfplots@enlarge@limit@for{#1}%
\fi
\global\let\pgfplots@glob@TMPa=\bool@pgfplots@loc@enlargeany
- % assignments are made globally.
+ % limits assignments are made globally.
+ \xdef\pgfplots@glob@TMPb{%
+ \noexpand\pgfplots@enlargelimits@remember@abs@dimension{#1}%
+ {\bool@pgfplots@loc@enlargelimits@min}%
+ {\bool@pgfplots@loc@enlargelimits@max}%
+ {\pgfplots@enlargelimits@absdimension}%
+ }%
\endgroup
+ \pgfplots@glob@TMPb
\if1\pgfplots@glob@TMPa
\pgfplots@visphase@notify@changeofcanvaslimits{#1}%
\fi
}
+% Reconfigures the scaling routines such that following calls to
+% \pgfplots@scaleaxes@to@BB@ will enlarge the limit for a specific
+% axis by an absolute dimension.
+%
+% This enlargement is different from standard limit enlargement:
+% Standart limit enlargement is typically applied (and finished) long
+% before the scaling routines start. In fact, the result of
+% enlargelimits is typically the input argument for the scaling
+% (compare the pgfplots manual (pdf)).
+%
+% This here needs a different treatment because "enlarge x limits={abs=1cm}"
+% has to be applied AFTER the scaling is complete. To this end, it is
+% applied as the very last scaling step. It is applied after any post
+% scales, and it only modifies axis limits.
+%
+% #1: x,y, or z
+% #2: 1 if the lower limit shall be enlarged, 0 if not
+% #3: 1 if the upper limit shall be enlarged, 0 if not
+% #4: some absolute dimension (like 1cm) by which we want to enlarge
+% axis limits.
+\def\pgfplots@enlargelimits@remember@abs@dimension#1#2#3#4{%
+ \expandafter\edef\csname pgfplots@enlargelimits@absdimension@#1\endcsname{#4}%
+ \expandafter\edef\csname pgfplots@enlargelimits@absdimension@#1@minmax\endcsname{{#2}{#3}}%
+}%
+\let\pgfplots@enlargelimits@absdimension@x=\pgfutil@empty
+\let\pgfplots@enlargelimits@absdimension@y=\pgfutil@empty
+\let\pgfplots@enlargelimits@absdimension@z=\pgfutil@empty
+
+% Called as soon as the scaling is completely set up and any
+% "enlarge #1 limits={abs=1cm}"
+% enlargements shall be done, i.e. enlargement by unit.
+%
+% #1: x,y, or z
+\def\pgfplots@scaling@apply@enlargelimits@by@dimension#1{%
+ \expandafter\ifx\csname pgfplots@enlargelimits@absdimension@#1\endcsname\pgfutil@empty
+ \else
+ \pgfplotsconvertunittocoordinate{#1}{\csname pgfplots@enlargelimits@absdimension@#1\endcsname}%
+ \edef\pgfplots@loc@TMPa{%
+ \noexpand\pgfplots@enlarge@limit@by@dimension{#1}
+ \csname pgfplots@enlargelimits@absdimension@#1@minmax\endcsname
+ {\pgfmathresult}%
+ }%
+ \pgfplots@loc@TMPa
+ \fi
+}%
+
+
+% PRECONDITION:
+% 1. width/height are set
+% 2. the unit vectors point indicate whether the axis is a standard
+% box or some skewed plot (their precise direction and magnitude is
+% irrelevant)
+% 3. the enlargelimits code has already evaluated the case
+% "enlargelimits={abs=1cm}"
+%
+% POSTCONDITION:
+% width and/or height might be modified
+\def\pgfplots@scaling@changewidthheight@for@enlargelimits@by@dimension{%
+ \ifpgfplots@enlargelimits@respect@figure@size
+ %
+ % decide if we need to do anything at all, i.e. if there IS
+ % some option 'enlarge * limits={abs=1cm}' :
+ \pgfplots@loc@tmpfalse
+ \ifx\pgfplots@enlargelimits@absdimension@x\pgfutil@empty
+ \else
+ \pgfplots@loc@tmptrue
+ \fi
+ \ifx\pgfplots@enlargelimits@absdimension@y\pgfutil@empty
+ \else
+ \pgfplots@loc@tmptrue
+ \fi
+ \ifx\pgfplots@enlargelimits@absdimension@z\pgfutil@empty
+ \else
+ \pgfplots@loc@tmptrue
+ \fi
+ %
+ \ifpgfplots@loc@tmp
+ \def\pgfplotsretval{}%
+ % ok. We encountered an option 'enlarge * limits={abs=1cm}' for at least one axis.
+ % and we WANT to keep 'width', 'height'.
+ %
+ % This is not quite trivial because in order to compute
+ % enlarge-by-dimension, we NEED the unit vectors. But the
+ % unit vectors need the limits - a nonlinear problem.
+ %
+ % Since this here is not really a common use-case, I
+ % decided to implement a heuristics which works in most
+ % common cases: for standard 2d axes. It might fail for
+ % skewed axes and it will probably fail for 3d axes.
+ %
+ % My idea is to change width and/or height BEFORE the unit
+ % vectors have been computed.
+ %
+ % First: check if we HAVE a standard 2d axis.
+ \pgfplots@loc@tmpfalse
+ \ifpgfplots@threedim
+ \else
+ \ifdim\pgf@xx=0sp %
+ \else
+ \ifdim\pgf@xy=0sp %
+ \ifdim\pgf@yx=0sp %
+ \ifdim\pgf@yy=0sp %
+ \else
+ \pgfplots@loc@tmptrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ %
+ \ifpgfplots@loc@tmp
+ \def\pgfplots@loc@TMPc{{1}{1}}%
+ %
+ % ah - we really *have* a standard boxed axis.
+ % Compute
+ % newwidth = width - enlargevalue
+ % newheight = height - enlargevalue
+ %
+ % newwidth will be stored in \pgfplots@loc@TMPa
+ % and newheight in \pgfplots@loc@TMPb
+ \ifx\pgfplots@enlargelimits@absdimension@x\pgfutil@empty
+ \let\pgfplots@loc@TMPa=\pgfplots@width
+ \else
+ \ifx\pgfplots@enlargelimits@absdimension@x@minmax\pgfplots@loc@TMPc
+ \def\pgfmathresult{2}%
+ \else
+ \def\pgfmathresult{1}%
+ \fi
+ \pgfmathparse{\pgfplots@width - \pgfmathresult * \pgfplots@enlargelimits@absdimension@x}%
+ \edef\pgfplots@loc@TMPa{\pgfmathresult pt}%
+ \fi
+ %
+ \ifx\pgfplots@enlargelimits@absdimension@y\pgfutil@empty
+ \let\pgfplots@loc@TMPb=\pgfplots@height
+ \else
+ \ifx\pgfplots@enlargelimits@absdimension@y@minmax\pgfplots@loc@TMPc
+ \def\pgfmathresult{2}%
+ \else
+ \def\pgfmathresult{1}%
+ \fi
+ \pgfmathparse{\pgfplots@height - \pgfmathresult * \pgfplots@enlargelimits@absdimension@y}%
+ \edef\pgfplots@loc@TMPb{\pgfmathresult pt}%
+ \fi
+ %
+ % OK. if( newwidth>0 && newheight>0 ), we can proceed.
+ \pgfplots@loc@tmpfalse
+ \ifdim\pgfplots@loc@TMPa>10pt %
+ \ifdim\pgfplots@loc@TMPb>10pt %
+ \pgfplots@loc@tmptrue
+ \fi
+ \fi
+ \ifpgfplots@loc@tmp
+ % Ah: newheight>0 && newheight>0 . Good.
+ \let\pgfplots@width=\pgfplots@loc@TMPa
+ \let\pgfplots@height=\pgfplots@loc@TMPb
+ \else
+ \def\pgfplotsretval{enlarge value are bigger than old picture size}%
+ \fi
+ \else
+ \def\pgfplotsretval{size adjust is unavailable for non-standard axes}%
+ \fi
+ \ifx\pgfplotsretval\pgfutil@empty
+ \else
+ \pgfplots@warning{enlargelimits respects figure size=true: could not respect the prescribed width/height (\pgfplotsretval). The size and/or aspect ratio of your image will be different than expected. You can try to modify BOTH width and height.}%
+ \fi
+ \fi
+ \fi
+}
+
+% this here applies changes required for 'enlarge #1 limits={abs=1cm}', i.e.
+% for the case of numbers with units.
+%
+% The main difference is that it is applied AFTER the scaling of the
+% axis is complete.
+%
+% #1: x,y,or z
+% #2: 1 if lower limit shall be changed
+% #3: 1 if upper limit shall be changed
+% #4: the absolute value
+\def\pgfplots@enlarge@limit@by@dimension#1#2#3#4{%
+ \begingroup
+ % ATTENTION: this uses similar access patterns as
+ % \pgfplots@enlarge@limit@ifconfigured
+ \def\bool@pgfplots@loc@enlargelimits@min{#2}%
+ \def\bool@pgfplots@loc@enlargelimits@max{#3}%
+ %
+ \let\pgfplots@enlargelimits@relthresh=\pgfutil@empty
+ \def\pgfplots@enlargelimits@absthresh{#4}
+ \def\pgfplots@enlargelimits@curaxis{#1}%
+ %
+ \def\bool@pgfplots@loc@enlargeany{0}%
+ \if1\bool@pgfplots@loc@enlargelimits@min
+ \def\bool@pgfplots@loc@enlargeany{1}%
+ \else
+ \if1\bool@pgfplots@loc@enlargelimits@max
+ \def\bool@pgfplots@loc@enlargeany{1}%
+ \fi
+ \fi
+ \if1\bool@pgfplots@loc@enlargeany
+ \pgfplots@enlarge@limit@for{#1}%
+ \fi
+ \global\let\pgfplots@glob@TMPa=\bool@pgfplots@loc@enlargeany
+ % limits assignments are made globally.
+ \endgroup
+ \if1\pgfplots@glob@TMPa
+ \pgfplots@visphase@notify@changeofcanvaslimits{#1}%
+ \fi
+}
+
+
% Helper method inside of \pgfplots@enlarge@limit@ifconfigured.
%
% It modifies '#1min' and '#1max' (globally!) according to the already prepared
@@ -4819,9 +5108,16 @@
\expandafter\let\expandafter\pgfplots@@min\csname pgfplots@#1min\endcsname
\expandafter\let\expandafter\pgfplots@@max\csname pgfplots@#1max\endcsname
\ifx\pgfplots@enlargelimits@relthresh\pgfutil@empty
- % we have an absolute enlarge value:
- \let\enlargeabsolute=\pgfplots@enlargelimits@absthresh
- \pgf@xb=\pgfplots@enlargelimits@absthresh pt
+ \ifx\pgfplots@enlargelimits@absthresh\pgfutil@empty
+ % ups. No enlargement!? OK, can happen for 'abs=1cm' ...
+ % numbers with unit are processed later (after the scaling
+ % is set up)
+ \pgf@xb=0pt %
+ \else
+ % we have an absolute enlarge value:
+ \let\enlargeabsolute=\pgfplots@enlargelimits@absthresh
+ \pgf@xb=\pgfplots@enlargelimits@absthresh pt
+ \fi
\else
% we have a relative enlarge value:
\pgfmathsubtract@\pgfplots@@max\pgfplots@@min%
@@ -6087,7 +6383,7 @@
}%
\def\pgfplotssetaxistype#1{%
- \pgfutil@ifundefined{pgfplots@axistype@#1}{%
+ \pgfutil@IfUndefined{pgfplots@axistype@#1}{%
\pgfplots@error{Sorry, 'axis type=#1' is unknown. Maybe you need to load a proper library first or you misspelled the name? Ignoring it}%
}{%
\csname pgfplots@axistype@#1\endcsname
@@ -6895,7 +7191,7 @@
\def\pgfplots@prepare@layered@graphics{%
% check if there are no layers at all.
\ifpgfplots@layered@graphics
- \pgfutil@ifundefined{pgf@layerlist}{%
+ \pgfutil@IfUndefined{pgf@layerlist}{%
}{%
\ifx\pgf@layerlist\pgfutil@empty
\pgfplots@layered@graphicsfalse
@@ -7070,7 +7366,7 @@
\else
% cell picture=false | cell picture=if necessary
\edef\pgfplots@shapename{pgfplots@low@level@shape@INNER}%
- \pgfutil@ifundefined{pgf@anchor@\pgfplots@shapename @\pgfplots@anchorname}{%
+ \pgfutil@IfUndefined{pgf@anchor@\pgfplots@shapename @\pgfplots@anchorname}{%
% we need to compute the anchor a posteriorily.
\if0\pgfplots@cell@picture@mode
% cell picture=false is forbidden here...
@@ -8649,6 +8945,15 @@
\pgfkeyssetfamily{/tikz/alias}{/pgfplots/naming commands}%
\pgfkeyssetfamily{/tikz/overlay}{/pgfplots/shared with tikz}%
\pgfkeyssetfamily{/tikz/variable}{/pgfplots}%
+ %
+ % ... we need to set these options during the survey phase
+ % (because it might be interesting for enlarge limits to depend
+ % upon their value):
+ \pgfkeysdef{/pgfplots/bar width}{\pgfkeysalso{/pgf/bar width={##1}}}%
+ \pgfkeysdef{/pgfplots/bar shift}{\pgfkeysalso{/pgf/bar shift={##1}}}%
+ \pgfkeyssetfamily{/pgf/bar width}{/pgfplots}%
+ \pgfkeyssetfamily{/pgf/bar shift}{/pgfplots}%
+ %
\pgfkeysinstallkeyfilterhandler{/pgf/key filter handlers/append filtered to}{\pgfplots@rmopts}%
%
\let\tikz@alias=\pgfutil@empty
@@ -9517,7 +9822,7 @@
\pgfplots@autocompute@all@limitsfalse
\fi
%
- \pgfutil@ifundefined{pgfmathdeclarefunction}{%
+ \pgfutil@IfUndefined{pgfmathdeclarefunction}{%
% SKIP: \pgfmathdeclarefunction is unavailable in pgf 2.00 .
% UPGRADE TO PGF 2.10 to use these math functions.
}{%
@@ -9553,7 +9858,7 @@
\pgfplots@stacked@reversefalse
\fi
%
- \pgfutil@ifundefined{label}{\relax}{%
+ \pgfutil@IfUndefined{label}{\relax}{%
\let\pgfplots@original@LaTeX@label=\label
\let\label=\pgfplots@plot@label
}%
@@ -9599,7 +9904,7 @@
% creates an axis and performs all postponed drawing operations.
\def\endpgfplots@environment@opt{%
\def\pgfplots@phase@name{v}%
- \pgfutil@ifundefined{label}{\relax}{%
+ \pgfutil@IfUndefined{label}{\relax}{%
% restore.
\let\label=\pgfplots@original@LaTeX@label
}%
@@ -9717,7 +10022,7 @@
\tikz@fig@mustbenamed
%
\edef\pgfplots@shapename{pgfplots@low@level@shape\ifpgfplots@deprecated@anchors @deprecated\fi}%
- \pgfutil@ifundefined{pgf@anchor@\pgfplots@shapename @\pgfplots@anchorname}{%
+ \pgfutil@IfUndefined{pgf@anchor@\pgfplots@shapename @\pgfplots@anchorname}{%
% Oh. Well, suppose \pgfplots@anchorname is associated to an
% INNER node.
\def\pgfplots@loc@TMPa##1{%
@@ -9837,7 +10142,7 @@
\else
%\message{Attempting to correct '\pgfplots@child@node@name' position by \meaning\pgfplots@offset\space (the node is inside of an axis).}%
\expandafter\ifx\csname pgfplots@child@node@visited@\pgfplots@child@node@name\endcsname\relax%
- \pgfutil@ifundefined{pgf@sh@nt@\pgfplots@child@node@name}{%
+ \pgfutil@IfUndefined{pgf@sh@nt@\pgfplots@child@node@name}{%
\pgfplots@warning{could not adjust coordinates of named node '\pgfplots@child@node@name' for reasons I do not understand! After finishing the image, it did no longer exist!? Sorry.}%
}{%
\pgf@shift@node{\pgfplots@child@node@name}{\pgfplots@offset}%
@@ -9883,7 +10188,7 @@
}
-\pgfutil@ifundefined{tikzaddtikzonlycommandshortcutlet}{%
+\pgfutil@IfUndefined{tikzaddtikzonlycommandshortcutlet}{%
\def\tikzaddtikzonlycommandshortcutlet#1#2{%
\expandafter\def\expandafter\tikz@installcommands\expandafter{\tikz@installcommands
\let#1=#2
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex
index aee93120a5e..442887292cb 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.revision.tex
@@ -1,3 +1,13 @@
-\def\pgfplotsrevision{%
-1.6.1
-}
+\begingroup
+\catcode`\-=12
+\catcode`\/=12
+\catcode`\.=12
+\catcode`\:=12
+\catcode`\+=12
+\catcode`\-=12
+\gdef\pgfplotsrevision{1.7-2-ge24fff4}
+\gdef\pgfplotsversion{1.7}
+\gdef\pgfplotsversiondatetime{2012-10-26 12:43:51 +0200}
+\gdef\pgfplots@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}
+\xdef\pgfplotsversiondate{\expandafter\pgfplots@glob@TMPa\pgfplotsversiondatetime\relax}
+\endgroup
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
index 79a4e5a11de..2560d084fef 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplots.scaling.code.tex
@@ -93,22 +93,36 @@
\pgfplots@initsizes@setunitvector{x}{0}{1}{\pgfplots@tmp@xisaxisparallel}%
\pgfplots@initsizes@setunitvector{y}{1}{1}{\pgfplots@tmp@yisaxisparallel}%
\pgfplots@initsizes@setunitvector{z}{2}{\pgfplots@tmp@Zscale}{\pgfplots@loc@TMPc}%
+ %
+ \pgfplots@scaling@changewidthheight@for@enlargelimits@by@dimension%
+ %
\pgfplots@scale@plotbox@to@widthheight
- \ifpgfplots@threedim
- \pgfplotsgetnormalforcurrentview
- \fi
\else
% 3D case by `view':
\let\pgfplots@x=\pgfutil@empty
\let\pgfplots@y=\pgfutil@empty
\let\pgfplots@z=\pgfutil@empty
\pgfplotssetaxesfromazel{\pgfplots@view@az}{\pgfplots@view@el}{\pgfplots@tmp@xisaxisparallel}%
+ %
+ \pgfplots@scaling@changewidthheight@for@enlargelimits@by@dimension%
+ %
\pgfplots@scale@plotbox@to@widthheight
\if1\pgfplots@tmp@xisaxisparallel%
\def\pgfplots@tmp@yisaxisparallel{1}%
\fi
\fi
-%\message{Pgfplots debug: initialised unit vectors to x=(\the\pgf@xx,\the\pgf@xy), y=(\the\pgf@yx,\the\pgf@yy), z=(\the\pgf@zx,\the\pgf@zy), n = (\pgfplots@view@dir@threedim).^^J }%
+ \pgfplots@computeunitvectorlengths
+ %
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{x}%
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{y}%
+ \ifpgfplots@threedim
+ \pgfplots@scaling@apply@enlargelimits@by@dimension{z}%
+ \fi
+ %
+ \ifpgfplots@threedim
+ \pgfplotsgetnormalforcurrentview
+ \fi
+%\message{Pgfplots debug: initialised unit vectors to x=(\the\pgf@xx,\the\pgf@xy), y=(\the\pgf@yx,\the\pgf@yy), z=(\the\pgf@zx,\the\pgf@zy), n = (\pgfplots@view@dir@threedim). Limits are x=\pgfplots@xmin:\pgfplots@xmax, y=\pgfplots@ymin:\pgfplots@ymax^^J }%
%
\let\pgfplotsmathfloatviewdepthxyz@=\pgfplotsmathfloatviewdepthxyz@infigure
\let\pgfplotsmathviewdepthxyz@=\pgfplotsmathviewdepthxyz@infigure
@@ -381,10 +395,11 @@
\def\pgfplots@scale@mode@choice{2}% stretch to fill
\fi
\pgfplots@scaleaxes@to@BB@{#1}{#2}%
- \pgfplots@computeunitvectorlengths
- \pgfplots@rescale@view@dir
+ % NOTE: we have not yet computed the lengths of unit vectors. In
+ % addition, we have not yet updated the normal vector.
}%
+% DEPRECATED:
\def\pgfplots@rescale@view@dir{%
\expandafter\ifx\csname pgfplots@view@dir@threedim\endcsname\relax
\else
@@ -531,6 +546,7 @@
\fi
}
+
\def\pgfplots@scaleaxes@to@BB@#1#2{%
\begingroup
%
@@ -613,6 +629,7 @@
\ifpgfplots@threedim
\pgfplots@axis@apply@post@scale{z}%
\fi
+ %
% and finally, resize limits appropriately and add all cumulative limit compensations:
\xdef\pgfplots@glob@TMPa{%
%
@@ -790,6 +807,10 @@
% #4: the scale to be applied to y unit
% #5: the scale to be applied to z unit
\def\pgfplots@scaling@compute@final@scales#1#2#3#4#5{%
+ % ##1: the axis (x,y,or z)
+ % ##2: the horizontal scale
+ % ##3: the vertical scale
+ % ##4: the inverse unit scale for this axis
\def\pgfplots@loc@TMPa##1##2##3##4{%
\pgfplotscoordmath{\pgfplots@compat@scaling@coordmath}{parsenumber}{##2}%
\let\xscale@@=\pgfmathresult
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
index a80e77884ce..a6fa1eae255 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
@@ -2609,7 +2609,7 @@
}%
\def\pgfplotscoordstream@firstlast@update{%
\ifx\pgfplots@current@point@x\pgfutil@empty
- % only one \if is enough as ONE empty coordinate results all
+ % only one \if is enough as ONE empty coordinate causes all
% others to be reset as well.
\else
\ifx\pgfplots@currentplot@firstcoord@x\pgfutil@empty
@@ -4509,12 +4509,13 @@
\def\pgfplots@coord@stream@foreach@NORMALIZED@curencoded@braced{{#1}}%
\pgfplotsaxisdeserializedatapointfrom{#1}%
\pgfplots@coord@stream@coord
- \pgfplotscoordstream@firstlast@update
+ \pgfplotsplothandlerifcurrentpointcanbefirstlast{%
+ \pgfplotscoordstream@firstlast@update
+ }{}%
\expandafter\pgfplots@foreach@plot@coord@NORMALIZED@ITERATE
\fi
}
-
% A common routine which resets internal data structures for the
% survey phase, i.e. it is the shared implementation for all \addplot
% variations.
@@ -4946,6 +4947,8 @@
% \foreach because \foreach does NOT allow extended
% precision. Besides, \pgfplotsforeachungrouped avoids
% scoping problems.
+ \let\pgfplots@plot@data@notify@next@x=\relax
+ \let\pgfplots@plot@data@notify@next@y=\relax
%
\ifpgfplots@curplot@threedim
\def\pgfplots@addplotimpl@expression@split@yz##1,##2\pgfplots@EOI{%
@@ -4971,7 +4974,11 @@
\edef\pgfplots@plot@data##1{%
\noexpand\pgfplotsforeachungrouped\expandafter\noexpand\pgfplots@plot@var@y in {\pgfplots@expression@ydomain}
{%
- \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@expression@xdomain} {##1}%
+ \pgfplots@plot@data@notify@next@y
+ \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@expression@xdomain} {%
+ \pgfplots@plot@data@notify@next@x
+ ##1%
+ }%
\noexpand\pgfplotsplothandlernotifyscanlinecomplete
}%
}%
@@ -4979,7 +4986,11 @@
% sample a line:
\def\pgfplots@plot@ydomain{0:0}%
\edef\pgfplots@plot@data##1{%
- \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@expression@xdomain} {##1}}%
+ \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@expression@xdomain} {%
+ \pgfplots@plot@data@notify@next@x
+ ##1%
+ }%
+ }%
%
% If we have (\x,\y,f(x)), use (\x,0,f(x)) instead and
% suppress the error message which would occur for \y.
@@ -5015,7 +5026,12 @@
\edef\pgfplots@plot@data##1{%
\noexpand\pgfplotsforeachlogarithmicungrouped[\pgfplots@plot@samples]
\expandafter\noexpand\tikz@plot@var/\noexpand\pgfplots@current@point@x@log
- in {\pgfplots@plot@domain} {##1}}%
+ in {\pgfplots@plot@domain}%
+ {%
+ \pgfplots@plot@data@notify@next@x
+ ##1%
+ }%
+ }%
% we have a logarithmic sampling sequence,
% \pgfplots@current@point@x@log is already available
% logarithmic! We can safe time and accuracy for the x
@@ -5045,8 +5061,13 @@
% use 'samples at':
\let\pgfplots@loc@TMPa=\pgfplots@plot@samples@at
\fi
- \edef\pgfplots@plot@data##1{
- \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@loc@TMPa} {##1}}%
+ \edef\pgfplots@plot@data##1{%
+ \noexpand\pgfplotsforeachungrouped\expandafter\noexpand\tikz@plot@var in {\pgfplots@loc@TMPa}%
+ {%
+ \pgfplots@plot@data@notify@next@x
+ ##1%
+ }%
+ }%
\fi
\expandafter\def\pgfplots@plot@var@y{0}%
\def\pgfplots@addplotimpl@expression@yEXPR{#4}%
@@ -5080,6 +5101,13 @@
\let\pgfplots@addplotimpl@expression@pseudoconst@x=\pgfmathx@
\let\pgfplots@addplotimpl@expression@pseudoconst@y=\pgfmathy@
%
+% \if n\pgfplots@meshmode
+ % mesh=false : ignore patch type sampling.
+% \else
+ \ifpgfplotsplothandlermesh@patch@type@sampling
+ \pgfplots@plot@expression@prepare@patch@type@sampling
+ \fi
+% \fi
%
% Warning for use fpu=false: evaluation '\x^3' might be different from 'x^3' for
% negative arguments:
@@ -5141,6 +5169,87 @@
}%
+% This prepares the implementation for 'patch type sampling':
+\def\pgfplots@plot@expression@prepare@patch@type@sampling{%
+ \pgfplotsplothandlersurveyaddoptions{
+ mesh input=patches,%
+ }%
+ %
+ \pgfkeysgetvalue{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass
+ %
+ \let\pgfplots@plot@data@@=\pgfplots@plot@data
+ \let\pgfplots@plot@data@curx=\pgfutil@empty
+ \let\pgfplots@plot@data@cury=\pgfutil@empty
+ \let\pgfplots@plot@data@lastx=\pgfutil@empty
+ \let\pgfplots@plot@data@lasty=\pgfutil@empty
+ \let\pgfplots@plot@data@first@x=\pgfutil@empty
+ \let\pgfplots@plot@data@first@y=\pgfutil@empty
+ %
+ \def\pgfplots@plot@data@notify@next@x{%
+ \ifx\pgfplots@plot@data@first@x\pgfutil@empty
+ \edef\pgfplots@plot@data@first@x{\tikz@plot@var}%
+ \fi
+ \let\pgfplots@plot@data@lastx=\pgfplots@plot@data@curx
+ \edef\pgfplots@plot@data@curx{\tikz@plot@var}%
+ }%
+ \def\pgfplots@plot@data@notify@next@y{%
+ \ifx\pgfplots@plot@data@first@y\pgfutil@empty
+ \edef\pgfplots@plot@data@first@y{\pgfplots@plot@var@y}%
+ \fi
+ \let\pgfplots@plot@data@lasty=\pgfplots@plot@data@cury
+ \edef\pgfplots@plot@data@cury{\pgfplots@plot@var@y}%
+ }%
+ \def\pgfplots@plot@data##1{%
+ %
+ \pgfplots@plot@data@@{%
+ \let\tikz@plot@var@old=\tikz@plot@var
+ \let\pgfplots@plot@var@y@old=\pgfplots@plot@var@y
+ %
+ %
+ %
+ % boolean 'if is first row || is first cell':
+ \pgfplots@loc@tmpfalse
+ \ifx\pgfplots@plot@data@curx\pgfplots@plot@data@first@x
+ % ah - we have the first row.
+ \pgfplots@loc@tmptrue
+ \fi
+ \if0\b@pgfplots@should@sample@LINE
+ \ifx\pgfplots@plot@data@cury\pgfplots@plot@data@first@y
+ % ah - we have the first cell.
+ \pgfplots@loc@tmptrue
+ \fi
+ \fi
+ %
+ \ifpgfplots@loc@tmp
+ \else
+ \pgfmathparse{\pgfplots@plot@data@curx-\pgfplots@plot@data@lastx}%
+ \let\pgfplots@plot@data@hx=\pgfmathresult
+ %
+ \if0\b@pgfplots@should@sample@LINE
+ \pgfmathparse{\pgfplots@plot@data@cury-\pgfplots@plot@data@lasty}%
+ \let\pgfplots@plot@data@hy=\pgfmathresult
+ \fi
+ %
+ \def\pgfplotspatchready{\pgfplotsscanlinecomplete}%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{sample in unit cube}{%
+ \pgfmathparse{\pgfplots@plot@data@lastx + \pgfplotspatchclassx*\pgfplots@plot@data@hx}%
+ \let\tikz@plot@var=\pgfmathresult
+ %
+ \if0\b@pgfplots@should@sample@LINE
+ \pgfmathparse{\pgfplots@plot@data@lasty + \pgfplotspatchclassy*\pgfplots@plot@data@hy}%
+ \let\pgfplots@plot@var@y=\pgfmathresult
+ \fi
+ %
+ ##1%
+ %
+ \let\tikz@plot@var=\tikz@plot@var@old
+ \let\pgfplots@plot@var@y=\pgfplots@plot@var@y@old
+ }%
+ \fi
+ }%
+ }%
+}%
+
\let\pgfplots@backupof@pgfplotxyfile=\pgfplotxyfile
% the following code
@@ -7018,7 +7127,7 @@
\tikzset{every plot/.try}%
\pgfplots@coord@stream@INIT@finalize@storedcoords\pgfplots@recorded@marker@stream%
\expandafter\pgfplots@coord@stream@foreach@NORMALIZED\expandafter{\pgfplots@coord@stream@finalize@storedcoords@START@coords}%
- \pgfutil@ifundefined{pgfplotlastpoint}{}{%
+ \pgfutil@IfUndefined{pgfplotlastpoint}{}{%
\tikz@make@last@position{\pgfplotlastpoint}%
}%
\let\pgfplots@plot@timer@args=\pgfplots@coord@stream@finalize@storedcoords@START@coords
@@ -7608,11 +7717,14 @@
\ifx\pgfplots@plot@handler@graphics@pointmap@D@img\pgfutil@empty
\else
\pgfkeysgetvalue{/pgfplots/plot graphics/debug}\pgfplots@loc@TMPa
- \def\pgfplots@loc@TMPb{true}%
+ \def\pgfplots@loc@TMPb{false}%
+ \ifx\pgfplots@loc@TMPa\pgfutil@empty
+ \let\pgfplots@loc@TMPa=\pgfplots@loc@TMPb
+ \fi
\ifx\pgfplots@loc@TMPa\pgfplots@loc@TMPb
- \def\pgfplotsplothandlergraphicspointmapcomputerequiredview@debug{1}%
- \else
\def\pgfplotsplothandlergraphicspointmapcomputerequiredview@debug{0}%
+ \else
+ \def\pgfplotsplothandlergraphicspointmapcomputerequiredview@debug{1}%
\fi
% The following implementation computes the 'unit vector
% ratio' of the IMAGE.
@@ -7802,7 +7914,7 @@
\if1\pgfplotsplothandlergraphicspointmapcomputerequiredview@debug
See \the\t@pgfplots@tokc.dat for debug output.
\else
- Use 'plot graphics[debug] to generate debug output files.
+ Use 'plot graphics[debug]' or 'plot graphics[debug=visual]' to generate debug output files.
\fi
^^J}%
\endgroup
@@ -7839,6 +7951,7 @@
\immediate\write\w@pgf@writea{canvasmapmatrix=[\pgfplotsmatrix@text];^^Jcanvasmaprhs = [\pgfplotsrhs@text];^^J}%
%
\immediate\write\w@pgf@writea{key configuration = \pgfplotsretval;^^J}%
+ \immediate\write\w@pgf@writea{use debug=visual to see the mapped keys.^^J}%
\immediate\closeout\w@pgf@writea
\endgroup
}%
@@ -7963,6 +8076,17 @@
\pgfplots@plot@handler@graphics@DRAW@
};%
\endgroup
+ %
+ %
+ \pgfkeysgetvalue{/pgfplots/plot graphics/debug}\pgfplots@loc@TMPa
+ \edef\pgfplots@loc@TMPb{visual}%
+ \ifx\pgfplots@loc@TMPb\pgfplots@loc@TMPa
+ % debug = visual: "sanitize" also triggers the visualization.
+ \pgfplots@plot@handler@graphics@pointmap@sanitize@scaling{A}%
+ \pgfplots@plot@handler@graphics@pointmap@sanitize@scaling{B}%
+ \fi
+ %
+ %
\ifx\pgfplots@plot@handler@graphics@pointmap@C@canvas\pgfutil@empty
\ifpgfplots@threedim
\pgfplots@warning{plot graphics in 3D axis has just two inner anchors (those with '(x,y,z)=>(imgx,imgy)'). You should provide a third one such that I can check for correct scaling.}%
@@ -8026,24 +8150,33 @@
Please refer to the pgfplots manual for details. If you continue now, I'll show the points in the image}%
\endgroup
%
+ \pgfplots@plot@handler@graphics@pointmap@sanitize@scaling@draw
%
- \scope
- \pgfsetstrokecolor{black}%
- \pgfsetfillcolor{red}%
- \pgfpathcircle{\pgfplots@point@canvas@check}{2pt}%
- \pgfusepath{stroke,fill}%
- \pgfsetfillcolor{green}%
- \pgfpathcircle{\pgfplots@point@canvas}{2pt}%
- \pgfusepath{stroke,fill}%
- \draw[->,red]
- \pgfextra{
- \pgfpathmoveto{\pgfplots@point@canvas@check}%
- \pgfpathlineto{\pgfplots@point@canvas}};
- \endscope
+ \fi
+ \pgfkeysgetvalue{/pgfplots/plot graphics/debug}\pgfplots@loc@TMPa
+ \edef\pgfplots@loc@TMPb{visual}%
+ \ifx\pgfplots@loc@TMPb\pgfplots@loc@TMPa
+ \pgfplots@plot@handler@graphics@pointmap@sanitize@scaling@draw
\fi
\endgroup
}
+\def\pgfplots@plot@handler@graphics@pointmap@sanitize@scaling@draw{%
+ \scope
+ \pgfsetstrokecolor{black}%
+ \pgfsetfillcolor{red}%
+ \pgfpathcircle{\pgfplots@point@canvas@check}{2pt}%
+ \pgfusepath{stroke,fill}%
+ \pgfsetfillcolor{green}%
+ \pgfpathcircle{\pgfplots@point@canvas}{2pt}%
+ \pgfusepath{stroke,fill}%
+ \draw[->,red]
+ \pgfextra{
+ \pgfpathmoveto{\pgfplots@point@canvas@check}%
+ \pgfpathlineto{\pgfplots@point@canvas}};
+ \endscope
+}%
+
\def\pgfplots@plot@handler@graphics@usebb{%
\pgfpointdiff{\pgfplots@plot@handler@graphics@bb@first}{\pgfplots@plot@handler@graphics@bb@second}%
\def\pgfplots@plot@handler@graphics@finish@ok{1}%
@@ -8527,7 +8660,7 @@
% \pgfshell[\jobname]{cat table.dat}
% \pgfplotxyfile{\jobname.out}
-\pgfutil@ifundefined{w@pgf@writea}{%
+\pgfutil@IfUndefined{w@pgf@writea}{%
\csname newwrite\endcsname\pgf@shellwrite
}{%
\let\pgf@shellwrite=\w@pgf@writea
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex
index 35f64d032dd..5cd2d0b50be 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscore.code.tex
@@ -35,8 +35,19 @@
\immediate\write16{#1}%
}%
+% This is *identical* to \pgfutil@IfUndefined . I copied it here
+% because pgf up to and including version 2.10 does not contain it.
+\def\pgfplotsutil@IfUndefined#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\pgfutil@firstoftwo
+ \else
+ \expandafter\pgfutil@secondoftwo
+ \fi
+}
+\pgfplotsutil@IfUndefined{pgfutil@IfUndefined}{\let\pgfutil@IfUndefined=\pgfplotsutil@IfUndefined}{}
-\pgfutil@ifundefined{pgfkeys}{%
+\pgfutil@IfUndefined{pgfkeys}{%
\pgfplots@error{It seems your version of PGF/Tikz is older than 2.00. Unfortunately, pgfplots requires at least version 2.00 ... you may need to update your TeX-Distribution or install PGF manually, sorry}%
}{\relax}
@@ -141,7 +152,7 @@
\newdimen\pgfplots@tmpa
\newcount\c@pgfplots@coordindex
\newcount\c@pgfplots@scanlineindex
-\pgfutil@ifundefined{r@pgf@reada}{%
+\pgfutil@IfUndefined{r@pgf@reada}{%
\csname newread\endcsname\r@pgfplots@reada
}{%
\let\r@pgfplots@reada=\r@pgf@reada
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
index 8641fed58aa..9bef1959fba 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
@@ -24,6 +24,274 @@
%
%--------------------------------------------
+% The low-level tikz plot handler for 3D mesh and surface plots.
+%
+% It expects
+% a) a coordinate stream which is a linearized matrix, iterated either
+% rowwise or column wise,
+% b) the current set of options in /pgfplots/mesh/.
+%
+%
+% ATTENTION:
+% this handler is NOT as general as the others. In particular, it
+% can't be interrupted by TeX groups: every single statement,
+% starting with streamstart and ending with stream end, must be in
+% the same scope!
+%
+% As a consequence, you can't use this handler inside of (all) TikZ
+% input streams. Try it out. It will work in pgfplots, however.
+%
+% Furthermore, it relies on a couple of pgfplots macros. This may
+% change in future versions.
+% It relies on:
+% - \ifpgfplots@curplot@threedim
+% - \pgfplots@current@point@meta
+% -> it also invokes \pgfplots@perpointmeta@preparetrafo and its
+% @APPLY counterpart which checks for
+% - \pgfplots@metamax
+% If you use it outside of pgfplots, use
+% \global\let\pgfplots@metamax=\pgfutil@empty
+% This is can be used without an initialised
+% pgfplots axes - as long as \pgfplots@current@point@meta is in
+% the range [0,1000].
+% - for the case 'shader=interp', a bounding box must be established
+% before the plot is finished. This must be done using
+% \def\pgfplotspointbbupperright{\pgfqpointxyz{2}{2}{0.9}}
+% \def\pgfplotspointbblowerleft {\pgfqpointxyz{0}{0}{0.1}}
+% or something like that.
+%
+% Besides these internals, it also relies on all public /pgfplots
+% configuration keys related to mesh/surface plots.
+%
+% Please note that the 'z buffer' feature will not work without
+% pgfplots (especially the z buffer=sort feature).
+%
+% Here is an example which compiles without a pgfplots axes:
+% ----------------------------------------------------------
+% \begin{tikzpicture}
+% \scope[
+% /pgfplots/.cd,
+% surf,
+% shader=faceted,
+% mesh/rows=4,
+% mesh/cols=4,
+% mesh/num points=,
+% /tikz/x={(0.44237cm,-0.07439cm)},
+% /tikz/y={(0.30942cm,0.23932cm)},
+% /tikz/z={(0.0cm,1.5cm)},
+% ]
+% \makeatletter
+%
+% \global\let\pgfplots@metamax=\pgfutil@empty
+% \pgfplots@curplot@threedimtrue
+%
+% \pgfplotsplothandlermesh
+% \pgfplotstreamstart
+%
+% \def\rangea{0.21}%
+% \def\rangeb{0.9}%
+%
+% \pgfmathparse{1000/(\rangeb-\rangea)}
+% \let\factor=\pgfmathresult
+%
+% \def\simplecoordinate(#1,#2,#3){%
+% \pgfmathparse{\factor*(#3 - \rangea)}%
+% \let\pgfplots@current@point@meta=\pgfmathresult
+% \pgfplotstreampoint{\pgfqpointxyz{#1}{#2}{#3}}%
+% }%
+% % for the case 'shaer=interp':
+% \def\pgfplotspointbbupperright{\pgfqpointxyz{2}{2}{0.9}}
+% \def\pgfplotspointbblowerleft {\pgfqpointxyz{0}{0}{0.1}}
+%
+% \simplecoordinate(0,3,0.7)
+% \simplecoordinate(1,3,0.5)
+% \simplecoordinate(2,3,0.58)
+% \simplecoordinate(3,3,0.9)
+%
+% \simplecoordinate(0,2,0.68)
+% \simplecoordinate(1,2,0.22)
+% \simplecoordinate(2,2,0.25)
+% \simplecoordinate(3,2,0.4)
+%
+% \simplecoordinate(0,1,0.6)
+% \simplecoordinate(1,1,0.3)
+% \simplecoordinate(2,1,0.21)
+% \simplecoordinate(3,1,0.3)
+%
+% \simplecoordinate(0,0,0.8)
+% \simplecoordinate(1,0,0.56)
+% \simplecoordinate(2,0,0.5)
+% \simplecoordinate(3,0,0.75)
+%
+%
+% \pgfplotstreamend
+% \pgfusepath{stroke}
+%
+% \endscope
+% \end{tikzpicture}
+% ----------------------------------------------------------
+% END OF EXAMPLE
+% -> see also the legend image for mesh plots.
+%
+\def\pgfplotsplothandlermesh{%
+ \pgfkeysgetvalue{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass
+ \ifx\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@defaulttext
+ \let\pgfplotsplothandlermesh@patchclass=\pgfutil@empty
+ \fi
+ % FIXME : detect 1d mode here!
+ \ifx\pgfplotsplothandlermesh@patchclass\pgfutil@empty
+ % assign default patch class.
+ \if1\pgfplotsplothandlermesh@matrixinput
+ \def\pgfplotsplothandlermesh@patchclass{rectangle}%
+ \else
+ \def\pgfplotsplothandlermesh@patchclass{triangle}%
+ \fi
+ \pgfkeyslet{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass
+ \fi
+ %
+ \if0\pgfplotsplothandlermesh@matrixinput
+ % mesh input=patches: simply skip empty input lines:
+ \pgfkeyssetvalue{/pgfplots/empty line}{none}%
+ \fi
+ %
+ \pgfkeysgetvalue{/pgfplots/patch table/value}\pgfplotsplothandlermesh@patchtable
+ \ifx\pgfplotsplothandlermesh@patchtable\pgfutil@empty
+ \else
+ \def\pgfplotsplothandlermesh@matrixinput{0}% implies 'patch input=patches'
+ \let\pgfplotsplothandlersurveystart=\pgfplotsplothandlersurveystart@mesh@patchtable
+ \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@mesh@patchtable
+ \let\pgfplotsplothandlersurveyend=\pgfplotsplothandlersurveyend@mesh@patchtable
+ \fi
+ \def\pgf@plotstreamstart{%
+% \scope
+ %
+ % this shouldn't be necessary, but it doesn't hurt either.
+ \pgfplots@perpointmeta@preparetrafo
+ %
+ \def\pgfplotsplothandlermesh@ONEDIMMODE{0}%
+ \pgfplotsplothandlermesh@init@meshkeys
+ %
+ %
+ \let\pgfplotsplothandlermesh@patchclass@input=\pgfplotsplothandlermesh@patchclass
+ \let\pgfplotsplothandlermesh@patchclass@output=\pgfplotsplothandlermesh@patchclass@input
+ \if0\pgfplotsplothandlermesh@triangulate
+ \else
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@input}{triangulate class}%
+ \let\pgfplotsplothandlermesh@patchclass@output=\pgfplotsretval
+ \fi
+ %
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@input}{init}%
+ \ifx\pgfplotsplothandlermesh@patchclass@input\pgfplotsplothandlermesh@patchclass@output
+ \else
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{init}%
+ \fi
+ %
+ % assign boolean:
+ \let\b@pgfplotsplothandlermesh@matrixoutput=\pgfplotsplothandlermesh@matrixinput
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{allow matrix}%
+ \if0\pgfplotsretval
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ \ifnum\pgfkeysvalueof{/pgfplots/patch refines}>0
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ \if1\pgfplotsaxisplothasjumps
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ \if\pgfplotsplothandlermesh@zbuffer@choice4% 'z buffer=sort':
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ %
+ \if2\pgfplotsplothandlermesh@shader
+ % shader=interp
+ %
+ \pgfkeysgetvalue{/pgfplots/mesh/interior colormap name}\pgfplots@loc@TMPc
+ \ifx\pgfplots@loc@TMPc\pgfutil@empty
+ \else
+ \pgfplots@warning{the combination 'shader=interp,interior colormap name' is inefficient (it uses 'shader=faceted interp,faceted color=none') and may slow down the *display* of your document}%
+ \pgfplotsset{shader=faceted interp,faceted color=none}%
+ \fi
+ \fi
+ \if2\pgfplotsplothandlermesh@shader
+ \else
+ % 'shader!=interp'
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get pdf shading type}%
+ \if4\pgfplotsretval
+ \else
+ \if5\pgfplotsretval
+ \else
+ \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
+ \fi
+ \fi
+ %
+ % special handling: check if Type=5 shadings need to be
+ % converted to Type=4
+ \if0\b@pgfplotsplothandlermesh@matrixoutput
+ % no matrix output possible
+ \if5\pgfplotsretval
+ % pdf shading type=5 (matrix output)
+ \if2\pgfplotsplothandlermesh@shader
+ % shader=interp
+ %
+ % oh. shading type=5 is *essentially* the same as
+ % matrix output, but matrix output is forbidden.
+ % In that case, triangulate the matrix and shade the
+ % triangles:
+ \def\pgfplotsplothandlermesh@triangulate{1}%
+ \def\pgfplotsplothandlermesh@patchclass@output{triangle}%
+ % Note shader=faceted interp can be written as
+ % matrix -- it shades individual elements anyway;
+ % and one single patch can be written as matrix.
+ \fi
+ \fi
+ \fi
+ %
+ \pgfplotsplothandlermesh@init@DECODE
+ \pgfplotsplothandlermesh@init@REFINE
+ %
+ \pgfutil@IfUndefined{pgfplots@drawmodes}{%
+ \let\pgfplots@drawmodes=\tikz@mode
+ \let\pgfplots@drawoptions=\tikz@options
+ }{}%
+ %
+ %
+ % Prepare color data source:
+ \ifx\pgfplotspointmetainputhandler\pgfutil@empty%
+ % oh. There is no color data!?
+ \pgfplotsplothandlermesh@init@path@without@point@meta
+ %
+ \else
+ \pgfplotsplothandlermesh@init@cdata
+ \pgfplotsplothandlermesh@init@shader
+ \pgfplotsplothandlermesh@init@flat@color
+ \fi
+ % PREPARE THE STREAM PROCESSING:
+ % handling of jumps.
+ \pgfplotsplothandlermesh@init@jumphandling
+ %
+ \ifpgfplotsplothandlermesh@shownormals
+ \let\pgfplotsplothandlermesh@show@normals@if@configured=\pgfplotsplothandlermesh@show@normals
+ % actually store 3d coordinates:
+ \let\pgfplotsplothandlermesh@serialize@logical@coords=\pgfplotsplothandlermesh@serialize@logical@coords@doit
+ \fi
+ %
+ % z buffering:
+ \pgfplotsplothandlermesh@init@zbuffer
+ %
+ \pgfplotsplothandlermesh@init@mesh@stream
+ %
+ \c@pgfplots@scanlineindex=0
+ }%
+ %
+ \let\pgfplotsplothandlerifcurrentpointcanbefirstlast=\pgfplotsplothandlerifcurrentpointcanbefirstlast@mesh
+}%
+
+\def\pgfplotsplothandlerifcurrentpointcanbefirstlast@mesh#1#2{%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{if current point can be first last}{#1}{#2}%
+}%
+
% Assigns default values to 'rows' and 'cols' in case
% their values are empty.
%
@@ -332,6 +600,7 @@
}%
}%
+% #1: will be expanded with \edef
\def\pgfplotsplothandlermesh@setnextvertex#1{%
\pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{set next vertex}{#1}%
}%
@@ -383,8 +652,11 @@
\pgfpathclose
},
get num cdata vertices=\pgfplotspatchclass{\pgfplotspatchclassname}{get vertices},
+ get dimension=2,
+ supports global path=0,
set edge visible=\expandafter\edef\csname pgfppatchedge@##1\endcsname{##2},
uses view depth=0,
+ if current point can be first last=##1,
serialize except vertices=\let\pgfplotsretval\pgfutil@empty,
deserialize except vertices=##1,
serialize={%
@@ -424,6 +696,9 @@
compute normal={%
\pgfplotsplothandlermesh@compute@normal@default
},%
+ sample in unit cube={%
+ \pgfplots@error{sample in unit cube: not implemented for \pgfplotspatchclassname}%
+ },
}%
}{}%
%
@@ -453,6 +728,9 @@
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ allow matrix\endcsname{\def\pgfplotsretval{#1}}},%
uses view depth/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ uses view depth\endcsname{\def\pgfplotsretval{#1}}},%
+ %
+ % creates a new patch. The vertices need to be added by 'set next
+ % vertex'
new/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ new\endcsname{#1}},%
%
@@ -468,6 +746,37 @@
set next vertex/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ set next vertex\endcsname##1{#1}},%
%
+ %
+ % Creates a new patch by means of sampling. The sampling is
+ % applied in the unit cube [0,1]x[0,1] (unit interval if this is an 1d patch
+ % type).
+ %
+ % 'sample in unit cube={<code to invoke for each sampled point>}'
+ %
+ % It will invoke <code to invoke for each sampled point> once for
+ % every sampled vertex. The complete unit cube will be covered.
+ % Depending on the patch type, either one or more patches are
+ % required to fill the unit cube. As soon as one patch is ready,
+ % \pgfplotspatchready will be invoked.
+ %
+ %
+ % PRECONDITION:
+ % -\pgfplotspatchready is defined.
+ %
+ % Arguments:
+ % #1: code which will be invoked whenever a new coordinate is
+ % ready. Inside of #1, the macros \pgfplotspatchclassx and
+ % \pgfplotspatchclassy result in the x and y coordinate (inside
+ % of the unit cube), in fixed point representation.
+ %
+ % Example:
+ % \def\pgfplotspatchready{}
+ % \pgfplotspatchclass{biquadratic}{sample in unit cube}{%
+ % point ready at (\pgfplotspatchclassx, \pgfplotspatchclassy)
+ % }
+ sample in unit cube/.code=
+ {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ sample in unit cube\endcsname##1{#1}},%
+ %
% declares whether a single edge is visible or not.
% #1: an integer denoting the edge, either 0,1,2,...,N-1 where N = num verts
% #2: 0 if the edge is not to be stroked and 1 if it is stroked.
@@ -537,16 +846,32 @@
stream to shader/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ stream to shader\endcsname{#1}},%
%
- % expands to the number of vertices.
+ % defines \pgfplotsretval to contain the number of vertices.
get num vertices/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ get num vertices\endcsname{\def\pgfplotsretval{#1}}},%
%
- % expands to the number of vertices which have color data
+ % defines \pgfplotsretval to contain the number of vertices which have color data
% attached. This is usually the same as 'get num vertices' (but
% see coons patches).
get num cdata vertices/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ get num cdata vertices\endcsname{\def\pgfplotsretval{#1}}},%
%
+ % defines \pgfplotsretval to contain the dimension of this patch
+ % (either 1 for lines or 2 for patches).
+ get dimension/.code=
+ {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ get dimension\endcsname{\def\pgfplotsretval{#1}}},%
+ %
+ % defines \pgfplotsretval to be 1 if and only if the patch class
+ % supports global paths.
+ % A global path is one which is drawn as one huge, uninterrupted
+ % PGF path (except for jumps perhaps). Its area can be filled,
+ % i.e. it behaves exactly like the 'sharp' plot handler. This is
+ % used implicitly if 'point meta=none' (if there is point meta
+ % data, we always want individual path segments and \pgfusepath
+ % them after each segment).
+ supports global path/.code=
+ {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ supports global path\endcsname{\def\pgfplotsretval{#1}}},%
+ %
% Approximates the given patch by at least one triangle.
% For every finished triangle, \pgfplotspatchready will be invoked
% and \pgfplotsplothandlermesh@patchclass will be set to triangle.
@@ -597,6 +922,11 @@
% This method REQUIRES that 3d coordinates are stored (see \pgfplotsplothandlermesh@serialize@logical@coords).
compute normal/.code=
{\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ compute normal\endcsname{#1}},%
+ %
+ % executes '##1' if the current point can be the first or last
+ % point of the patch. Executes ##2 if that is not the case.
+ if current point can be first last/.code=
+ {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ if current point can be first last\endcsname##1##2{#1}},%
}
% This implements 'compute normal' :
@@ -721,14 +1051,26 @@
\pgfplotspatchready%
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \pgfplotspatchready
+ },%
+ get dimension=1,
+ supports global path=1,
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@A\endvertex #1%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@line@B\endvertex #1%
},
fill path={%
- \pgfpathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@line@A\endvertex}%
+ \pgfplotsplothandlermesh@pathmoveto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@line@A\endvertex}%
\pgfpathlineto{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@line@B\endvertex}%
+ \pgfplotsplothandlermesh@setlastpoint{\expandafter\pgfplotspointpatchvertex\pgfplotspatchclass@line@B\endvertex}%
},
serialize except vertices=\let\pgfplotsretval\pgfutil@empty,%
deserialize except vertices=,
@@ -736,6 +1078,37 @@
get pdf shading type=0,
}%
+\def\pgfplotsplothandlermesh@last@x{-16000pt}
+\def\pgfplotsplothandlermesh@last@y{-16000pt}
+
+\def\pgfplotsplothandlermesh@pathmoveto#1{%
+ \pgf@process{#1}%
+ \pgfpathmoveto{}%
+}
+\def\pgfplotsplothandlermesh@setlastpoint#1{%
+}
+
+% Applies a moveto to #1 - but only if #1 is NOT the last used path
+% segment.
+\def\pgfplotsplothandlermesh@pathmoveto@globalpath#1{%
+ \pgf@process{#1}%
+ \pgfplots@loc@tmptrue
+ \ifdim\pgf@x=\pgfplotsplothandlermesh@last@x\relax
+ \ifdim\pgf@y=\pgfplotsplothandlermesh@last@y\relax
+ \pgfplots@loc@tmpfalse
+ \fi
+ \fi
+ \ifpgfplots@loc@tmp
+ \pgfpathmoveto{}%
+ \fi
+}%
+
+\def\pgfplotsplothandlermesh@setlastpoint@globalpath#1{%
+ \pgf@process{#1}%
+ \xdef\pgfplotsplothandlermesh@last@x{\the\pgf@x}%
+ \xdef\pgfplotsplothandlermesh@last@y{\the\pgf@y}%
+}%
+
\pgfplotsdeclarepatchclass{triangle}{%
allow matrix=0,
new=\def\pgfplotspatchclass@tri@no{0}\let\pgfplotspatchclass@trie@AB\relax,
@@ -752,6 +1125,30 @@
\pgfplotspatchready%
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \pgfplotspatchready
+ %
+ %
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@tri@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@tri@A\endvertex #1%
@@ -917,6 +1314,21 @@
\pgfplotspatchready%
\fi
},
+ sample in unit cube={%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{0}%
+ #1%
+ \def\pgfplotspatchclassx{1}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \def\pgfplotspatchclassx{0}%
+ \def\pgfplotspatchclassy{1}%
+ #1%
+ \pgfplotspatchready
+ },%
first vertex=\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex,
foreach vertex={%
\expandafter\pgfplotspatchvertex\pgfplotspatchclass@rect@A\endvertex #1%
@@ -1027,8 +1439,10 @@
% Thus, \csname #1A\endcsname is the first vertex, \csname #1B\endcsname the second
% and #1C, #1D the third and fourth.
%
-% #2: A macro name. It will be defined to be either A,B,C or D.
-% #3: A macro name. It will be defined to be either empty or 'r'. If
+% [output] #2: A macro name which will be filled with the FIRST point
+% to stream to the shader. It will be defined to be either A,B,C or D.
+% [output] #3: A macro name which indicates whether the stream shall
+% be forward or backward. It will be defined to be either empty or 'r'. If
% it is empty, the coons patch shall be in the sequence
% #2,next(#2),next(next(#2),....
% If it is 'r', the coons patch shall be in the sequence
@@ -1078,273 +1492,40 @@
\def#3{}%
}
-% The low-level tikz plot handler for 3D mesh and surface plots.
-%
-% It expects
-% a) a coordinate stream which is a linearized matrix, iterated either
-% rowwise or column wise,
-% b) the current set of options in /pgfplots/mesh/.
-%
-%
-% ATTENTION:
-% this handler is NOT as general as the others. In particular, it
-% can't be interrupted by TeX groups: every single statement,
-% starting with streamstart and ending with stream end, must be in
-% the same scope!
-%
-% As a consequence, you can't use this handler inside of (all) TikZ
-% input streams. Try it out. It will work in pgfplots, however.
-%
-% Furthermore, it relies on a couple of pgfplots macros. This may
-% change in future versions.
-% It relies on:
-% - \ifpgfplots@curplot@threedim
-% - \pgfplots@current@point@meta
-% -> it also invokes \pgfplots@perpointmeta@preparetrafo and its
-% @APPLY counterpart which checks for
-% - \pgfplots@metamax
-% If you use it outside of pgfplots, use
-% \global\let\pgfplots@metamax=\pgfutil@empty
-% This is can be used without an initialised
-% pgfplots axes - as long as \pgfplots@current@point@meta is in
-% the range [0,1000].
-% - for the case 'shader=interp', a bounding box must be established
-% before the plot is finished. This must be done using
-% \def\pgfplotspointbbupperright{\pgfqpointxyz{2}{2}{0.9}}
-% \def\pgfplotspointbblowerleft {\pgfqpointxyz{0}{0}{0.1}}
-% or something like that.
-%
-% Besides these internals, it also relies on all public /pgfplots
-% configuration keys related to mesh/surface plots.
-%
-% Please note that the 'z buffer' feature will not work without
-% pgfplots (especially the z buffer=sort feature).
+\def\pgfplotsplothandlermesh@patchclass@defaulttext{default}%
+
+% This is a VERY special case. The idea is to switch to
+% "normal" path mode:
+% \pgfpathmoveto \pgfpathlineto \pgfpathlineto
+% \pgfpathlineto \pgfusepath.
%
-% Here is an example which compiles without a pgfplots axes:
-% ----------------------------------------------------------
-% \begin{tikzpicture}
-% \scope[
-% /pgfplots/.cd,
-% surf,
-% shader=faceted,
-% mesh/rows=4,
-% mesh/cols=4,
-% mesh/num points=,
-% /tikz/x={(0.44237cm,-0.07439cm)},
-% /tikz/y={(0.30942cm,0.23932cm)},
-% /tikz/z={(0.0cm,1.5cm)},
-% ]
-% \makeatletter
-%
-% \global\let\pgfplots@metamax=\pgfutil@empty
-% \pgfplots@curplot@threedimtrue
-%
-% \pgfplotsplothandlermesh
-% \pgfplotstreamstart
-%
-% \def\rangea{0.21}%
-% \def\rangeb{0.9}%
-%
-% \pgfmathparse{1000/(\rangeb-\rangea)}
-% \let\factor=\pgfmathresult
-%
-% \def\simplecoordinate(#1,#2,#3){%
-% \pgfmathparse{\factor*(#3 - \rangea)}%
-% \let\pgfplots@current@point@meta=\pgfmathresult
-% \pgfplotstreampoint{\pgfqpointxyz{#1}{#2}{#3}}%
-% }%
-% % for the case 'shaer=interp':
-% \def\pgfplotspointbbupperright{\pgfqpointxyz{2}{2}{0.9}}
-% \def\pgfplotspointbblowerleft {\pgfqpointxyz{0}{0}{0.1}}
-%
-% \simplecoordinate(0,3,0.7)
-% \simplecoordinate(1,3,0.5)
-% \simplecoordinate(2,3,0.58)
-% \simplecoordinate(3,3,0.9)
-%
-% \simplecoordinate(0,2,0.68)
-% \simplecoordinate(1,2,0.22)
-% \simplecoordinate(2,2,0.25)
-% \simplecoordinate(3,2,0.4)
-%
-% \simplecoordinate(0,1,0.6)
-% \simplecoordinate(1,1,0.3)
-% \simplecoordinate(2,1,0.21)
-% \simplecoordinate(3,1,0.3)
-%
-% \simplecoordinate(0,0,0.8)
-% \simplecoordinate(1,0,0.56)
-% \simplecoordinate(2,0,0.5)
-% \simplecoordinate(3,0,0.75)
-%
-%
-% \pgfplotstreamend
-% \pgfusepath{stroke}
-%
-% \endscope
-% \end{tikzpicture}
-% ----------------------------------------------------------
-% END OF EXAMPLE
-% -> see also the legend image for mesh plots.
+% Note that the mesh handler's default is to issue
+% \pgfusepath after *each* elementary patch.
%
-\def\pgfplotsplothandlermesh{%
- \pgfkeysgetvalue{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass
- \ifx\pgfplotsplothandlermesh@patchclass\pgfplotsplothandlermesh@patchclass@defaulttext
- \let\pgfplotsplothandlermesh@patchclass=\pgfutil@empty
- \fi
- % FIXME : detect 1d mode here!
- \ifx\pgfplotsplothandlermesh@patchclass\pgfutil@empty
- % assign default patch class.
- \if1\pgfplotsplothandlermesh@matrixinput
- \def\pgfplotsplothandlermesh@patchclass{rectangle}%
- \else
- \def\pgfplotsplothandlermesh@patchclass{triangle}%
- \fi
- \pgfkeyslet{/pgfplots/patch type}\pgfplotsplothandlermesh@patchclass
- \fi
- %
- \if0\pgfplotsplothandlermesh@matrixinput
- % mesh input=patches: simply skip empty input lines:
- \pgfkeyssetvalue{/pgfplots/empty line}{none}%
- \fi
- %
- \pgfkeysgetvalue{/pgfplots/patch table/value}\pgfplotsplothandlermesh@patchtable
- \ifx\pgfplotsplothandlermesh@patchtable\pgfutil@empty
+% This special use-case might not cover all aspects of the
+% mesh/surf/patch plot handler.
+\def\pgfplotsplothandlermesh@init@path@without@point@meta{%
+ %
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{supports global path}%
+ \ifnum\pgfplotsretval=1 %
+ \def\pgfplotsplothandlermesh@definecolor{%
+ % no-op
+ }%
+ % FIXME : this does not handle separate edges, i.e.
+ % \pgfplotsplothandlermesh@VISUALIZE@std@separate@fillstroke
+ \def\pgfplotsplothandlermesh@VISUALIZE{\pgfplotsplothandlermesh@VISUALIZE@globalpath@fill@andor@stroke}%
+ \let\pgfplotsplothandlermesh@pathmoveto=\pgfplotsplothandlermesh@pathmoveto@globalpath
+ \let\pgfplotsplothandlermesh@setlastpoint=\pgfplotsplothandlermesh@setlastpoint@globalpath
+ %
+ % This activates tikz colors:
+ %\tikz@options
+ \pgfplots@drawoptions
+ % Acquire the values for \tikz@mode@* [used for faceted]
+ \pgfplots@drawmodes
\else
- \def\pgfplotsplothandlermesh@matrixinput{0}% implies 'patch input=patches'
- \let\pgfplotsplothandlersurveystart=\pgfplotsplothandlersurveystart@mesh@patchtable
- \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@mesh@patchtable
- \let\pgfplotsplothandlersurveyend=\pgfplotsplothandlersurveyend@mesh@patchtable
+ \pgfplots@error{Please provide 'point meta' for your plot. Omitting point meta is only supported for 1d patch types.}%
\fi
- \def\pgf@plotstreamstart{%
-% \scope
- %
- % this shouldn't be necessary, but it doesn't hurt either.
- \pgfplots@perpointmeta@preparetrafo
- %
- \def\pgfplotsplothandlermesh@ONEDIMMODE{0}%
- \pgfplotsplothandlermesh@init@meshkeys
- %
- %
- \let\pgfplotsplothandlermesh@patchclass@input=\pgfplotsplothandlermesh@patchclass
- \let\pgfplotsplothandlermesh@patchclass@output=\pgfplotsplothandlermesh@patchclass@input
- \if0\pgfplotsplothandlermesh@triangulate
- \else
- \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@input}{triangulate class}%
- \let\pgfplotsplothandlermesh@patchclass@output=\pgfplotsretval
- \fi
- %
- \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@input}{init}%
- \ifx\pgfplotsplothandlermesh@patchclass@input\pgfplotsplothandlermesh@patchclass@output
- \else
- \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{init}%
- \fi
- %
- % assign boolean:
- \let\b@pgfplotsplothandlermesh@matrixoutput=\pgfplotsplothandlermesh@matrixinput
- \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{allow matrix}%
- \if0\pgfplotsretval
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- \ifnum\pgfkeysvalueof{/pgfplots/patch refines}>0
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- \if1\pgfplotsaxisplothasjumps
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- \if\pgfplotsplothandlermesh@zbuffer@choice4% 'z buffer=sort':
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- %
- \if2\pgfplotsplothandlermesh@shader
- % shader=interp
- %
- \pgfkeysgetvalue{/pgfplots/mesh/interior colormap name}\pgfplots@loc@TMPc
- \ifx\pgfplots@loc@TMPc\pgfutil@empty
- \else
- \pgfplots@warning{the combination 'shader=interp,interior colormap name' is inefficient (it uses 'shader=faceted interp,faceted color=none') and may slow down the *display* of your document}%
- \pgfplotsset{shader=faceted interp,faceted color=none}%
- \fi
- \fi
- \if2\pgfplotsplothandlermesh@shader
- \else
- % 'shader!=interp'
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass@output}{get pdf shading type}%
- \if4\pgfplotsretval
- \else
- \if5\pgfplotsretval
- \else
- \def\b@pgfplotsplothandlermesh@matrixoutput{0}%
- \fi
- \fi
- %
- % special handling: check if Type=5 shadings need to be
- % converted to Type=4
- \if0\b@pgfplotsplothandlermesh@matrixoutput
- % no matrix output possible
- \if5\pgfplotsretval
- % pdf shading type=5 (matrix output)
- \if2\pgfplotsplothandlermesh@shader
- % shader=interp
- %
- % oh. shading type=5 is *essentially* the same as
- % matrix output, but matrix output is forbidden.
- % In that case, triangulate the matrix and shade the
- % triangles:
- \def\pgfplotsplothandlermesh@triangulate{1}%
- \def\pgfplotsplothandlermesh@patchclass@output{triangle}%
- % Note shader=faceted interp can be written as
- % matrix -- it shades individual elements anyway;
- % and one single patch can be written as matrix.
- \fi
- \fi
- \fi
- %
- \pgfplotsplothandlermesh@init@DECODE
- \pgfplotsplothandlermesh@init@REFINE
- %
- \pgfutil@ifundefined{pgfplots@drawmodes}{%
- \let\pgfplots@drawmodes=\tikz@mode
- \let\pgfplots@drawoptions=\tikz@options
- }{}%
- %
- %
- % Prepare color data source:
- \ifx\pgfplotspointmetainputhandler\pgfutil@empty%
- % oh. There is no color data!? Well... then use a constant
- % color.
- %
- % This activates tikz colors:
- %\tikz@options
- \def\pgfplotsplothandlermesh@definecolor{%
- \pgfplots@drawoptions
- }%
- \else
- \pgfplotsplothandlermesh@init@cdata
- \pgfplotsplothandlermesh@init@shader
- \pgfplotsplothandlermesh@init@flat@color
- \fi
- % PREPARE THE STREAM PROCESSING:
- % handling of jumps.
- \pgfplotsplothandlermesh@init@jumphandling
- %
- \ifpgfplotsplothandlermesh@shownormals
- \let\pgfplotsplothandlermesh@show@normals@if@configured=\pgfplotsplothandlermesh@show@normals
- % actually store 3d coordinates:
- \let\pgfplotsplothandlermesh@serialize@logical@coords=\pgfplotsplothandlermesh@serialize@logical@coords@doit
- \fi
- %
- % z buffering:
- \pgfplotsplothandlermesh@init@zbuffer
- %
- \pgfplotsplothandlermesh@init@mesh@stream
- %
- \c@pgfplots@scanlineindex=0
- }%
-}%
-\def\pgfplotsplothandlermesh@patchclass@defaulttext{default}%
+}
% implements 'show normals'. Keep in mind that this is more-or-less a
% debugging helper, not productive code.
@@ -1502,9 +1683,17 @@
\pgfplotsplothandlermesh@usepath
\pgfplotsplothandlermesh@show@normals@if@configured
}%
-\let\pgfplotsplothandlermesh@VISUALIZE@std=\pgfplotsplothandlermesh@VISUALIZE@std@fill@andor@stroke
-\let\pgfplotsplothandlermesh@VISUALIZE=\pgfplotsplothandlermesh@VISUALIZE@std
+% a special VISUALIZE implementation which allows to draw a CONTINUOS
+% global path, i.e. one which is not "\pgfusepath"ed after each patch
+% segment. This is only used if 'point meta=none'
+\def\pgfplotsplothandlermesh@VISUALIZE@globalpath@fill@andor@stroke{%
+ \pgfplotspatchclass{\pgfplotsplothandlermesh@patchclass}{fill path}%
+}%
+
+\def\pgfplotsplothandlermesh@VISUALIZE@std{\pgfplotsplothandlermesh@VISUALIZE@std@fill@andor@stroke}
+
+\def\pgfplotsplothandlermesh@VISUALIZE{\pgfplotsplothandlermesh@VISUALIZE@std}
\let\pgfplotsplothandlermesh@show@normals@if@configured\relax
@@ -1765,6 +1954,12 @@
% mesh input=patches
\pgfkeys{/pgfplots/mesh/ordering/x varies}% disable any special handling.
\fi
+ %
+ \pgfplotspatchclass{\pgfkeysvalueof{/pgfplots/patch type}}{get dimension}%
+ \ifnum\pgfplotsretval=1 %
+ \def\pgfplots@meshmode{m}% mesh.
+ \fi
+ %
}%
\let\pgfplotsplothandlermesh@interior@exterior@hook=\relax
@@ -1904,9 +2099,6 @@
\def\pgfplotsplothandlermesh@init@shader{%
%
% Now, process the 'shader' key here:
- \if\pgfplotsplothandlermesh@ONEDIMMODE1
- \def\pgfplots@meshmode{m}% 'mesh'
- \fi
\if\pgfplots@meshmode m% mesh
% this is processed by the 'shader=flat' code below.
\def\pgfplotsplothandlermesh@shader{0}% 'flat'
@@ -2276,7 +2468,7 @@
\pgfmathparse{1000/(\rangeb-\rangea)}
\let\factor=\pgfmathresult
- \pgfutil@ifundefined{pgfqpointxyz@orig}{%
+ \pgfutil@IfUndefined{pgfqpointxyz@orig}{%
\let\pgfqpointxyz@orig=\pgfqpointxyz
}{}%
%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex
index 961362a1857..9d17a2e157d 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex
@@ -404,7 +404,63 @@
\expandafter\pgfplotsplothandlers@init@\expandafter{\pgfplots@loc@TMPa}%
}%
%
+ \if1\b@pgfplots@compat@bar@width@units
+ \else
+ \def\pgfplotbarwidth{\pgfplots@bar@width@not@in@context}%
+ \def\pgfplotbarshift{\pgfplots@bar@shift@not@in@context}%
+ \pgfplotsutil@add@to@macro\pgfplothandlerxbar{%
+ \def\pgfplotbarwidth{\pgfplots@xbar@width}%
+ \def\pgfplotbarshift{\pgfplots@xbar@shift}%
+ }%
+ \pgfplotsutil@add@to@macro\pgfplothandlerybar{%
+ \def\pgfplotbarwidth{\pgfplots@ybar@width}%
+ \def\pgfplotbarshift{\pgfplots@ybar@shift}%
+ }%
+ \fi
+ %
\pgfplotsplothandlers@init@map@to@patched@versions
+ %
+}%
+
+\def\pgfplots@xbar@width{pgfplotsxbarwidth}
+\def\pgfplots@ybar@width{pgfplotsybarwidth}
+\def\pgfplots@xbar@shift{pgfplotsxbarshift}
+\def\pgfplots@ybar@shift{pgfplotsybarshift}
+\def\pgfplots@bar@width@not@in@context{pgfplotsbarwidthgeneric}
+\def\pgfplots@bar@shift@not@in@context{pgfplotsbarshiftgeneric}
+
+\pgfmathdeclarefunction{pgfplotsxbarwidth}{0}{\pgfplots@bar@mathparse@{y}{bar width}}%
+\pgfmathdeclarefunction{pgfplotsybarwidth}{0}{\pgfplots@bar@mathparse@{x}{bar width}}%
+\pgfmathdeclarefunction{pgfplotsxbarshift}{0}{\pgfplots@bar@mathparse@{y}{bar shift}}%
+\pgfmathdeclarefunction{pgfplotsybarshift}{0}{\pgfplots@bar@mathparse@{x}{bar shift}}%
+\pgfmathdeclarefunction{pgfplotsbarwidthgeneric}{0}{\pgfplots@bar@mathparse@{N}{bar width}}%
+\pgfmathdeclarefunction{pgfplotsbarshiftgeneric}{0}{\pgfplots@bar@mathparse@{N}{bar shift}}%
+
+\def\pgfplots@bar@mathparse@#1#2{%
+ \pgfmathparse{\pgfkeysvalueof{/pgf/#2}}%
+ \ifpgfmathunitsdeclared
+ \else
+ \if N#1%
+ \pgfplots@bar@mathparse@error{#1}{#2}%
+ \else
+ \let\pgfplots@loc@TMPa=\pgfmathresult
+ \csname pgfplotstransformdirection#1\endcsname{\pgfplots@loc@TMPa}%
+ \let\pgfplots@loc@TMPa=\pgfmathresult
+ \if#1x%
+ \pgfqpointxy{\pgfplots@loc@TMPa}{0}%
+ \edef\pgfmathresult{\pgf@sys@tonumber\pgf@x}%
+ \else
+ \pgfqpointxy{0}{\pgfplots@loc@TMPa}%
+ \edef\pgfmathresult{\pgf@sys@tonumber\pgf@y}%
+ \fi
+ %\edef\pgfplots@loc@TMPa{{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}}%
+ %\expandafter\pgfmathveclen@\pgfplots@loc@TMPa
+ \fi
+ \fi
+}%
+
+\def\pgfplots@bar@mathparse@error#1#2{%
+ \pgfplots@error{Sorry, the value '#2=\pgfkeysvalueof{/pgf/#2}' is given in terms of a unit -- but I do not know which axis! Please set one of 'xbar' or 'ybar' before evaluating the value of '#2'}%
}%
% Resets the plot handler routines.
@@ -425,6 +481,7 @@
\let\pgfplotsplothandlersurveydifflen=\pgfplotsplothandlersurveydifflen@default
\let\pgfplotsplothandlersurveypointattime=\pgfplotsplothandlersurveypointattime@default
\let\pgfplotsplothandlertransformslopedattime=\pgfplotsplothandlertransformslopedattime@default
+ \let\pgfplotsplothandlerifcurrentpointcanbefirstlast=\pgfplotsplothandlerifcurrentpointcanbefirstlast@default
}%
% \pgfplotsplothandlersurveystart
@@ -435,6 +492,13 @@
[tikz@plot@handler: \meaning\pgf@plotstreamstart]%
}%
+% \pgfplotsplothandlerifcurrentpointcanbefirstlast : can be used to
+% check if the current point of a plot handler can be the global first
+% or last segment.
+% It will execute #1 if that is the case and #2 if not.
+\def\pgfplotsplothandlerifcurrentpointcanbefirstlast@default#1#2{#1}%
+
+
% \pgfplotsplothandlersurveyend
% Called at the end of each survey phase.
\def\pgfplotsplothandlersurveyend@default{}
@@ -1852,6 +1916,7 @@
contour external/scanline marks/required/.code={\def\pgfplotsplothandlercontourexternal@scanlinemode{2}},
contour external/scanline marks/true/.code={\def\pgfplotsplothandlercontourexternal@scanlinemode{2}},
contour external/scanline marks/if in input,
+ contour external/output point meta/.initial=,
contour external/file/.initial=,% auto-generate
contour external/script extension/.initial=script,
contour external/script/.initial=,% not yet initialised
@@ -2479,10 +2544,15 @@
\pgfplotsplothandlercontourprepared
\let\pgfplots@coord@stream@start=\relax% has already been done.
\def\pgfplots@coord@stream@end{\pgfplotsplothandlersurveyend}%
- \ifpgfplots@curplot@threedim
- \pgfplotssetpointmetainput{z}{}%
+ \pgfkeysgetvalue{/pgfplots/contour external/output point meta}\pgfplots@loc@TMPa
+ \ifx\pgfplots@loc@TMPa\pgfutil@empty
+ \ifpgfplots@curplot@threedim
+ \pgfplotssetpointmetainput{z}{}%
+ \else
+ \pgfplotssetpointmetainput{explicit}{}%
+ \fi
\else
- \pgfplotssetpointmetainput{explicit}{}%
+ \expandafter\pgfplots@pgfkeys@set@point@meta@value\expandafter{\pgfplots@loc@TMPa}%
\fi
\pgfplots@addplotimpl@file@streamit{\pgfplotsplothandlercontourexternal@file.table}%
\closein\r@pgfplots@reada
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex
index b908154f070..a76168b25db 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsstackedplots.code.tex
@@ -266,12 +266,12 @@
{\csname pgfplots@current@point@\pgfplots@stacked@dir\endcsname}}%
}{%
% LOG. we need to compute log(zerolevel + current):
- % FIXME : this is WRONG!
- % 1. I need 'default' because I need to deal with arbitrary floats.
- % 2. I need the correct log basis -- which, however, is only
- % available as argument for coordmath \pgfplots@stacked@dir!
- \pgfplotscoordmath{default}{parsenumber}{\csname pgfplots@current@point@\pgfplots@stacked@dir\endcsname}%
- \pgfplotscoordmath{default}{exp}{\pgfmathresult}%
+ % FIXME : this might work, but is is hackery - because the
+ % coordmath framework handles log bases in a very stupid way.
+ % improve it somehow!
+ \edef\pgfmathresult{\csname pgfplots@current@point@\pgfplots@stacked@dir\endcsname}%
+ \pgfplotscoordmath{\pgfplots@stacked@dir}{exp}{\pgfmathresult}%
+ \pgfplotscoordmath{default}{parsenumber}{\pgfmathresult}%
\expandafter\let\csname pgfplots@current@point@\pgfplots@stacked@dir\endcsname=\pgfmathresult
\pgfplotscoordmath{default}{op}{\pgfplots@stacked@op}{%
{\csname pgfplots@stacked@zerolevelpoint@\pgfplots@stacked@dir\endcsname}%
diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def
index e8e9a4568a4..d28777ad4dd 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def
+++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def
@@ -98,7 +98,7 @@
}%
%
% \pgfplots@loc@TMPb := final boolean luaBinaryEncoding;
- \pgfutil@ifundefined{directlua}{%
+ \pgfutil@IfUndefined{directlua}{%
\def\pgfplots@loc@TMPb{0}%
}{%
\ifx\pgfplotslibrarysurf@filter@decode\pgfutil@empty
diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex b/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
index f4bd3054304..155e05d9aee 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
@@ -76,7 +76,7 @@
\fi
}
-\pgfutil@ifundefined{AtBeginDocument}{%
+\pgfutil@IfUndefined{AtBeginDocument}{%
}{%
\AtBeginDocument{%
\pgfplots@show@suggested@compat@value
diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex
index c9baffcb6dd..6414f57a9a8 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsbinary.code.tex
@@ -220,7 +220,7 @@
%
% The standard method - it results in binary encoded numbers.
binary encoding/.code={%
- \pgfutil@ifundefined{directlua}{%
+ \pgfutil@IfUndefined{directlua}{%
\let\pgfplotscharno=\pgfplotscharno@bincatcode
}{%
% Ah - we use LuaTeX!
diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex
index 0c1f8dc41fe..0ef2cb01c8d 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex
@@ -83,16 +83,16 @@
% #1: the required LaTeX package
% #2: the feature which requires this package
\def\pgfplots@assert@LaTeX@package@loaded#1#2{%
- \pgfutil@ifundefined{@ifpackageloaded}{%
+ \pgfutil@IfUndefined{@ifpackageloaded}{%
\pgfplots@error{Sorry, #2 only works with LaTeX (it relies on the LaTeX package #1)}%
}{%
- \pgfutil@ifundefined{ver@#1.sty}% this here has been extracted from ltclass.dtx. \@ifpackageloaded is only usable in preamble.
+ \pgfutil@IfUndefined{ver@#1.sty}% this here has been extracted from ltclass.dtx. \@ifpackageloaded is only usable in preamble.
{\pgfplots@error{Sorry, use need \string\usepackage{#1} in your preamble for '#2'}}%
{\relax}%
}%
}%
\def\pgfplots@assert@tikzinternal@exists#1{%
- \pgfutil@ifundefined{#1}{%
+ \pgfutil@IfUndefined{#1}{%
\pgfplots@error{Sorry, pgfplots relies on the existance of the tikz internal macro '#1'.
Unfortunately, this does no longer exist ... you will need to get an updated version of pgfplots to fix this problem.}%
\expandafter\let\csname #1\endcsname=\pgfutil@empty
@@ -119,7 +119,7 @@
% #2: a macro name WITHOUT backslash.
% #3: the default value if everything fails.
\def\pgfplots@gettikzinternal@keyval#1#2#3{%
- \pgfutil@ifundefined{#2}{%
+ \pgfutil@IfUndefined{#2}{%
\pgfkeysifdefined{/tikz/#1}{%
\pgfkeysgetvalue{/tikz/#1}\pgfplots@TMP
\expandafter\let\csname #1\endcsname=\pgfplots@TMP
@@ -138,7 +138,7 @@
}%
\def\pgfplots@getcurrent@plothandler#1{%
- \pgfutil@ifundefined{tikz@plot@handler}{%
+ \pgfutil@IfUndefined{tikz@plot@handler}{%
\pgfplots@error{Sorry, can't get the current plot handler. It appears that tikz and pgfplots is no longer compatible!? You will need to get a newer version of pgfplots.}%
\let#1=\pgfplothandlerlineto
}{%
@@ -212,7 +212,7 @@
}%
\pgfplots@command@to@string\pgfplotsutil@@arg@ifdefined\pgfplotsutil@@arg@ifdefined
\expandafter\pgfplotsutil@trim\expandafter{\pgfplotsutil@@arg@ifdefined}%
- \pgfutil@ifundefined{\pgfplotsretval}{#3}{#2}%
+ \pgfutil@IfUndefined{\pgfplotsretval}{#3}{#2}%
}%
% The same as \pgfplotsutil@ifdefinedui but appends the suffix '#2' to
% '#1' after '#1' has been normalized.
@@ -223,7 +223,7 @@
}%
\pgfplots@command@to@string\pgfplotsutil@@arg@ifdefined\pgfplotsutil@@arg@ifdefined
\expandafter\pgfplotsutil@trim\expandafter{\pgfplotsutil@@arg@ifdefined}%
- \pgfutil@ifundefined{\pgfplotsretval #2}{#4}{#3}%
+ \pgfutil@IfUndefined{\pgfplotsretval #2}{#4}{#3}%
}%
% Writes the command name of '#1' without the leading backslash to
@@ -804,6 +804,18 @@
%
\edef\pgfplots@loc@TMPb{#4}%
\expandafter\pgfplotsforeachlogarithmicungrouped@readdomain\pgfplots@loc@TMPb\relax
+ \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{if is bounded}{\pgfplots@foreach@loc@TMPb}{%
+ }{%
+ \pgfplotsforeachlogarithmicmath@unbounded@domain{#4}%
+ \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{parsenumber}{-10000}%
+ \let\pgfplots@foreach@loc@TMPb=\pgfmathresult
+ }%
+ \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{if is bounded}{\pgfplots@foreach@loc@TMPa}{%
+ }{%
+ \pgfplotsforeachlogarithmicmath@unbounded@domain{#4}%
+ \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{parsenumber}{-10000}%
+ \let\pgfplots@foreach@loc@TMPa=\pgfmathresult
+ }%
% compute mesh width into \pgfplots@foreach@loc@TMPc:
% \pgfplots@foreach@loc@TMPc := h := ( log(xmax) - log(xmin) ) / (N-1)
\pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{subtract}{{\pgfplots@foreach@loc@TMPb}{\pgfplots@foreach@loc@TMPa}}%
@@ -841,6 +853,11 @@
% restore scoped variables:
\pgfplots@foreach@loc@TMPd
}
+
+\def\pgfplotsforeachlogarithmicmath@unbounded@domain#1{%
+ \pgfplots@error{Sorry, the provided domain #1 is unsuitable for logarithmic sampling (applying the log results in unbounded values)}%
+}%
+
% can be used to convert the number format from float to something
% else.
\def\pgfplotsforeachlogarithmicungrouped@finalizeresult{}%
@@ -930,7 +947,7 @@
}
\def\pgfplots@logfileopen#1{%
\immediate\write-1{PGFPlots: reading {#1}}%
- \pgfutil@ifundefined{tikzifexternalizingcurrent}{%
+ \pgfutil@IfUndefined{tikzifexternalizingcurrent}{%
% version not up-to-date or external lib not loaded?
}{%
% adjust the .dep file only if we are externalizing.
@@ -1162,7 +1179,7 @@
-\pgfutil@ifundefined{pgfmathdeclarefunction}{%
+\pgfutil@IfUndefined{pgfmathdeclarefunction}{%
% BACKWARDS COMPATIBILITY: We have PGF 2.00 :
\def\pgfplotsmathdeclarepseudoconstant#1#2{%
\t@pgfplots@toka=\expandafter{\csname pgfmath#1@\endcsname}%
@@ -1459,12 +1476,12 @@
% defines \pgfplotsretval to be
%
-% \tikzifinpicture{#1}{#2}
+% \ifpgfpicture #1\else #2\fi
%
% and handles the '/pgfplots/invoke before crossref tikzpicture' key.
%
-% #1 first argument to \tikzifinpicture
-% #2 second argument to \tikzifinpicture
+% #1 first argument to \ifpgfpicture
+% #2 second argument to \ifpgfpicture
\def\pgfplots@assemble@ref@picture#1#2{%
\begingroup
\pgfkeysgetvalue{/pgfplots/invoke before crossref tikzpicture}\pgfplots@loc@TMPa
@@ -1474,13 +1491,13 @@
\toks2={#2}%
\toks3=\expandafter{\pgfplots@loc@TMPb}%
\xdef\pgfplots@glob@TMPa{%
- \noexpand\tikzifinpicture
- {\the\toks0}%
- {%
- \the\toks1
- \the\toks2
- \the\toks3
- }%
+ \noexpand\ifpgfpicture
+ \the\toks0 %
+ \noexpand\else
+ \the\toks1
+ \the\toks2
+ \the\toks3
+ \noexpand\fi
}%
\endgroup
\let\pgfplotsretval=\pgfplots@glob@TMPa
@@ -1491,7 +1508,7 @@
\immediate\write\@auxout{#1}%
\fi
}%
-\pgfutil@ifundefined{if@filesw}{%
+\pgfutil@IfUndefined{if@filesw}{%
\def\pgfplots@auxwrite#1{}%
}{%
\let\pgfplots@auxwrite=\pgfplots@auxwrite@latex
@@ -1958,10 +1975,17 @@
\gdef\pgfplotsHASH{#}%
\catcode`\%=12 \gdef\pgfplotsPERCENT{%}}
-\pgfutil@ifundefined{directlua}{}{%
+\pgfutil@IfUndefined{directlua}{}{%
\directlua{require(\pgfplotsDQ pgfplots.lua\pgfplotsDQ)}%
}%
+% swaps the content of two macros
+\def\pgfplotsutil@swap#1#2{%
+ \let\pgfplotsutil@swap@=#1%
+ \let#1=#2%
+ \let#2=\pgfplotsutil@swap@
+}%
+
\input pgfplotsliststructure.code.tex
\input pgfplotsliststructureext.code.tex
\input pgfplotsarray.code.tex
diff --git a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
index 416f0f22836..5fce5642009 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
+++ b/Master/texmf-dist/tex/latex/pgfplots/libs/tikzlibrarypgfplots.clickable.code.tex
@@ -195,7 +195,7 @@
\iwvo{\endgroup}
\iwvo{\string\endinput}%
}
-\pgfutil@ifundefined{write@objs}{}{%
+\pgfutil@IfUndefined{write@objs}{}{%
\ifx\write@objs\write@objs@BUGGY
\let\write@objs=\write@objs@CORRECT
\fi
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
index b394ca10f7e..1f4f8113da6 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
+++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
@@ -23,13 +23,12 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%--------------------------------------------
-\def\pgfplotsversion{1.6.1}
-\IfFileExists{pgfplots.revision.tex}{\input pgfplots.revision.tex } {\def\pgfplotsrevision{}}
-\ifx\pgfplotsrevision\pgfutil@empty
-\else
- \edef\pgfplotsrevision{\space(git show \pgfplotsrevision)}%
-\fi
-\ProvidesPackage{pgfplots}[2012/08/23 v\pgfplotsversion\pgfplotsrevision]
+\IfFileExists{pgfplots.revision.tex}{\input pgfplots.revision.tex } {%
+ \def\pgfplotsrevision{???}%
+ \def\pgfplotsversion{???}%
+ \def\pgfplotsversiondate{???}%
+}
+\ProvidesPackage{pgfplots}[\pgfplotsversiondate\space v\pgfplotsversion\space Data Visualization (\pgfplotsrevision)]
% ATTENTION:
% you MAY need one of
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty
index e5cbf82e730..ac619f7fd1b 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty
+++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplotstable.sty
@@ -18,7 +18,12 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%--------------------------------------------
-\ProvidesPackage{pgfplotstable}[2012/08/23 Part of pgfplots]
+\IfFileExists{pgfplots.revision.tex}{\input pgfplots.revision.tex } {%
+ \def\pgfplotsrevision{???}%
+ \def\pgfplotsversion{???}%
+ \def\pgfplotsversiondate{???}%
+}
+\ProvidesPackage{pgfplotstable}[\pgfplotsversiondate\space v\pgfplotsversion\space Table typesetting and Pretty-printing (\pgfplotsrevision)]
\RequirePackage{pgfplots}