summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex325
1 files changed, 252 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
index eecf176414f..5ec05fd41a0 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotscoordprocessing.code.tex
@@ -1180,6 +1180,8 @@
% vector (if there is one known). If there is no such value,
% \pgfplotsretval will be empty.
% #1 a three-character-string
+%
+% see \pgfplotspointouternormalvectorofaxissetv
\def\pgfplotspointouternormalvectorofaxisgetv#1{%
\edef\pgfplots@loc@TMPa{#1}%
\expandafter\pgfplotspointouternormalvectorofaxisgetv@\pgfplots@loc@TMPa\relax\relax\relax\relax
@@ -1484,6 +1486,9 @@
/pgfplots/sloped/execute for upside down/.initial=,
/pgfplots/sloped/reset nontranslations/.is if=pgfplots@sloped@resets@nontranslations,
/pgfplots/sloped/reset nontranslations/.default=true,
+ %
+ % only used by polar axes at the time of this writing:
+ /pgfplots/sloped/at position/.initial=,
}
% Installs a rotation transformation matrix such that labels or
% whatever are aligned precisely in direction of one of the two/three
@@ -1641,6 +1646,16 @@
% and the anchors of the node, I have to invert the matrix:
\pgftransforminvert
%
+ \pgfplotspointouternormalvectorofaxisgetv{#2}%
+ \ifx\pgfplotsretval\pgfutil@empty
+ \pgfkeysgetvalue{/pgfplots/near ticklabel at}\pgfplotsretval
+ \ifx\pgfplotsretval\pgfutil@empty
+ \else
+ % ah - we have one!
+ \csname pgfplotstransformcoordinate#1\endcsname{\pgfplotsretval}%
+ \pgfplotspointouternormalvectorofaxissetv{#2}{\pgfmathresult}%
+ \fi
+ \fi
%
% This here is the normal direction (points to the axis)
\pgfqpointscale{#4}{\pgfplotspointouternormalvectorofaxis{#2}}%
@@ -1901,6 +1916,16 @@
\pgfqkeys{/pgfplots/@declare coord math}{%
initialise=,
parse=\edef\pgfmathresult{##1}\expandafter\pgfmathparse\expandafter{\pgfmathresult},
+ parse int={%
+ \begingroup
+ \pgfplotscoordmath{\pgfplotscoordmathid}{parse}{##1}%
+ \pgfplotscoordmath{\pgfplotscoordmathid}{tofixed}{\pgfmathresult}%
+ \afterassignment\pgfplots@gobble@until@relax
+ \c@pgf@countd=\pgfmathresult\relax
+ \edef\pgfmathresult{\the\c@pgf@countd}%
+ \pgfmath@smuggleone\pgfmathresult
+ \endgroup
+ },
parsenumber=\pgfmathfloatparsenumber{##1}\pgfmathfloattofixed{##1},%
zero= \pgfplotscoordmath{\pgfplotscoordmathid}{parsenumber}{0},
one= \pgfplotscoordmath{\pgfplotscoordmathid}{parsenumber}{1},
@@ -1939,14 +1964,14 @@
max limit= \def\pgfmathresult{16300},%
if less than= {\pgfplotsmathlessthan{##1}{##2}\ifpgfmathfloatcomparison ##3\else ##4\fi},
if is= {%
- \if##20
- \ifdim##1pt=0pt ##2\else ##3\fi
+ \if##20%
+ \ifdim##1pt=0pt ##3\else ##4\fi
\else
- \if##2+\ifdim##1pt>0pt ##2\else ##3\fi
+ \if##2+\ifdim##1pt>0pt ##3\else ##4\fi
\else
- \if##2-\ifdim##1pt<0pt ##2\else ##3\fi
+ \if##2-\ifdim##1pt<0pt ##3\else ##4\fi
\else
- \def\pgfplots@loc@TMPd{##1}\ifx\pgfplots@loc@TMPd\pgfutil@empty ##2\else ##3\fi
+ \def\pgfplots@loc@TMPd{##1}\ifx\pgfplots@loc@TMPd\pgfutil@empty ##3\else ##4\fi
\fi
\fi
\fi
@@ -2024,6 +2049,8 @@
% required math library (which is not necessarily cheap)
parse/.code=
{\expandafter\def\csname pgfpmth\pgfplotsdeclarecoordmath@ parse\endcsname##1{#1}},%
+ parse int/.code=
+ {\expandafter\def\csname pgfpmth\pgfplotsdeclarecoordmath@ parse int\endcsname##1{#1}},%
%
% takes a parsed number and returns a fixed point number:
tofixed/.code=
@@ -2485,6 +2512,35 @@
\ifx\pgfplotspointmetainputhandler\pgfutil@empty #2\else #1\fi
}%
+\newif\ifpgfplots@perpointmeta@expand
+
+% Executes code '#2' if the point meta data #1 is bounded
+% and '#3' otherwise
+%
+% If the point meta is symbolic, it will always return true if and
+% only if the input is non-empty.
+\def\pgfplotsifpointmetaisbounded#1#2#3{%
+ \ifpgfplots@perpointmeta@expand
+ \edef\pgfplots@loc@TMPc{#1}%
+ \else
+ % symbolic point meta may have expansion issues -- but support one
+ % level as we usually invoke it with a macro name:
+ \expandafter\def\expandafter\pgfplots@loc@TMPc\expandafter{#1}%
+ \fi
+ \ifx\pgfplots@loc@TMPc\pgfutil@empty
+ % an empty meta data is _never_ bounded.
+ #3\relax
+ \else
+ \if1\csname pgfpmeta@\pgfplotspointmetainputhandler @issymbolic\endcsname
+ % a (non-empty, see above) symbolic meta data is "bounded"
+ #2\relax
+ \else
+ % check the number:
+ \pgfplotscoordmath{meta}{if is bounded}{\pgfplots@loc@TMPc}{#2}{#3}%
+ \fi
+ \fi
+}%
+
% Invokes '#1' if the axis contains the coordinate designated by
% \pgfplots@current@point@[xyz] and '#2' if not.
\def\pgfplotsaxisifcontainspoint#1#2{%
@@ -2537,14 +2593,26 @@
% See the definitions below for examples.
\def\pgfplotsdeclarepointmetasource#1#2{%
\expandafter\def\csname pgfpmeta@#1@assign\endcsname{\let\pgfplots@current@point@meta=\pgfutil@empty}%
- \expandafter\def\csname pgfpmeta@#1@initfor\endcsname##1{}%
+ \expandafter\def\csname pgfpmeta@#1@initfor\endcsname##1{%
+ \pgfplots@pointmeta@set@expand{#1}%
+ }%
\expandafter\def\csname pgfpmeta@#1@issymbolic\endcsname{0}%
\expandafter\def\csname pgfpmeta@#1@explicitinput\endcsname{0}%
\expandafter\def\csname pgfpmeta@#1@activate\endcsname{}%
\expandafter\def\csname pgfpmeta@#1@LUA class\endcsname{}%
+ \expandafter\def\csname pgfpmeta@#1@tostring\endcsname{#1}%
\edef\pgfplotsdeclarepointmetasource@{#1}%
\pgfqkeys{/pgfplots/@declare point meta src}{#2}%
}%
+
+\def\pgfplots@pointmeta@set@expand#1{%
+ \if1\csname pgfpmeta@#1@explicitinput\endcsname
+ \pgfplots@perpointmeta@expandfalse
+ \else
+ \pgfplots@perpointmeta@expandtrue
+ \fi
+}%
+
\pgfqkeys{/pgfplots/@declare point meta src}{%
%
% a macro used to initialise the point meta source when it is
@@ -2613,6 +2681,9 @@
% there is none.
LUA class/.code=
{\expandafter\def\csname pgfpmeta@\pgfplotsdeclarepointmetasource@ @LUA class\endcsname{#1}},%
+ %
+ tostring/.code=
+ {\expandafter\def\csname pgfpmeta@\pgfplotsdeclarepointmetasource@ @tostring\endcsname{#1}},%
}%
% An empty one. This is simple to check with
@@ -2687,6 +2758,7 @@
}{%
\def\pgfpmeta@expr@LUA@class{pgfplots.ExpressionPointMetaHandler.new("#1")}%
}%
+ \pgfplots@perpointmeta@expandtrue
},
LUA class=\pgfpmeta@expr@LUA@class,
}%
@@ -2715,6 +2787,7 @@
},%
initfor={%
\pgfkeysdef{/pgfplots/point meta/code}{#1}%
+ \pgfplots@perpointmeta@expandtrue
},
}%
\pgfplotsdeclarepointmetasource{TeX code symbolic}{%
@@ -2728,6 +2801,7 @@
},%
initfor={%
\pgfkeysdef{/pgfplots/point meta/code}{#1}%
+ \pgfplots@perpointmeta@expandfalse
},
issymbolic=1%
}%
@@ -2878,7 +2952,6 @@
\expandafter\let\expandafter\pgfplotsscanlinelengthincrease \csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @increase\endcsname
\edef\pgfplotsscanlinecomplete{%
\expandafter\noexpand\csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @complete\endcsname
- \noexpand\pgfplotsplothandlernotifyscanlinecomplete
}%
\expandafter\let\expandafter\pgfplotsscanlinelengthcleanup \csname pgfplotsscanlinelength@\pgfplots@loc@TMPa @cleanup\endcsname
\pgfplotsscanlinelength@initzero
@@ -2936,12 +3009,17 @@
% special marker which means 'inconsistent scan line length found'
\def\pgfplots@scanlinelength{-2}%
\fi
+ \pgfplotsplothandlernotifyscanlinecomplete
\fi
\else
\ifnum\pgfplots@scanlinelength=-2
\else
\edef\pgfplots@scanlinelength{\the\c@pgfplots@scanlineindex}%
\fi
+ %
+ \ifnum\c@pgfplots@scanlineindex>0
+ \pgfplotsplothandlernotifyscanlinecomplete
+ \fi
\fi
\c@pgfplots@scanlineindex=0
}
@@ -2977,20 +3055,24 @@
\if1\pgfplotsscanlinelength@nan@isfirst
\else
\def\pgfplotsscanlinelength@nan@pendingwork{%
- % this will be executed when the next point has been
- % found.
- \def\pgfplots@current@point@x{}%
- \def\pgfplots@current@point@y{}%
- \def\pgfplots@current@point@z{}%
- % simply serialize an empty point. That works -- the
- % visualization phase checks if the coordinates are empty and
- % visualizes them as "jump"
- %
- % Note that \pgfplotsplothandlersurveypoint is not a good
- % choice here unless one employs its 'unbounded coords=jump'
- % feature
- \def\pgfplotsaxisplothasjumps{1}%
- \pgfplotsaxisserializedatapoint
+ \ifpgfplots@LUA@backend@supported
+ \pgfplotsutil@directlua{pgfplots.texSurveyAddJump()}%
+ \else
+ % this will be executed when the next point has been
+ % found.
+ \def\pgfplots@current@point@x{}%
+ \def\pgfplots@current@point@y{}%
+ \def\pgfplots@current@point@z{}%
+ % simply serialize an empty point. That works -- the
+ % visualization phase checks if the coordinates are empty and
+ % visualizes them as "jump"
+ %
+ % Note that \pgfplotsplothandlersurveypoint is not a good
+ % choice here unless one employs its 'unbounded coords=jump'
+ % feature
+ \def\pgfplotsaxisplothasjumps{1}%
+ \pgfplotsaxisserializedatapoint
+ \fi
%
\let\pgfplotsscanlinelength@nan@pendingwork=\relax
}%
@@ -3004,6 +3086,7 @@
\def\pgfplotsaxisfilteredcoordsaway{0}%
\def\pgfplotsaxisplothasjumps{0}%
+\def\pgfplotsaxisplothasunboundedpointmeta{0}%
\newif\ifpgfplotsaxisparsecoordinateok
% Initialises
@@ -3070,6 +3153,7 @@
\fi
\def\pgfplotsaxisfilteredcoordsaway{0}%
\def\pgfplotsaxisplothasjumps{0}%
+ \def\pgfplotsaxisplothasunboundedpointmeta{0}%
%
% FIXME : these macros should not be redefined! They are defined
% in \pgfplots@prepare@axis@API right during \begin{axis}... they
@@ -3341,25 +3425,31 @@
\fi
%
\edef\pgfplots@set@perpointmeta@limits{%
- \noexpand\ifx\noexpand\pgfplots@current@point@meta\noexpand\pgfutil@empty
- \noexpand\else
+ \noexpand\pgfplotsifpointmetaisbounded{\noexpand\pgfplots@current@point@meta}{%
\the\t@pgfplots@tokb
- \noexpand\fi
- }%
- \def\pgfplotsaxisupdatelimitsforpointmeta##1{%
- \begingroup
- \def\pgfplots@current@point@meta{##1}%
- \pgfplots@set@perpointmeta@limits
- \endgroup
+ }{%
+ \noexpand\def\noexpand\pgfplotsaxisplothasunboundedpointmeta{1}%
+ }%
}%
\else
% there is no point meta:
\global\let\pgfplots@metamin=\pgfutil@empty
\global\let\pgfplots@metamax=\pgfutil@empty
- \let\pgfplots@set@perpointmeta@limits=\relax
- \def\pgfplotsaxisupdatelimitsforpointmeta##1{}%
+ \def\pgfplots@set@perpointmeta@limits{%
+ \pgfplotsifpointmetaisbounded{\pgfplots@current@point@meta}{%
+ }{%
+ \def\pgfplotsaxisplothasunboundedpointmeta{1}%
+ }%
+ }%
\fi
}%
+
+\def\pgfplotsaxisupdatelimitsforpointmeta#1{%
+ \begingroup
+ \def\pgfplots@current@point@meta{#1}%
+ \pgfplots@set@perpointmeta@limits
+ \endgroup
+}%
% This is the \pgfplots@coord@stream@end@ routine which is invoked by
% \pgfplots@PREPARE@COORD@STREAM.
%
@@ -3427,6 +3517,8 @@
% to share plot specifications between error bars and plot
% coordinates. Unfortunately, it is NOT sufficient to use
% \tikzset
+ %
+ %% FIXME : why is this here and not in the mesh plot handler!?
\pgfplotspreparemeshkeydefaults%
\pgfplots@PREPARE@COORD@STREAM@end@determinecoordsorting x%
\pgfplots@PREPARE@COORD@STREAM@end@determinecoordsorting y%
@@ -3516,8 +3608,10 @@
\noexpand\def\noexpand\pgfplots@visphase@names{\pgfplots@visphase@names}%
\noexpand\def\noexpand\pgfplotsaxisfilteredcoordsaway{\pgfplotsaxisfilteredcoordsaway}%
\noexpand\def\noexpand\pgfplotsaxisplothasjumps{\pgfplotsaxisplothasjumps}%
+ \noexpand\def\noexpand\pgfplotsaxisplothasunboundedpointmeta{\pgfplotsaxisplothasunboundedpointmeta}%
\noexpand\pgfkeyssetvalue{/pgfplots/on layer}{\pgfkeysvalueof{/pgfplots/on layer}}%
\noexpand\def\noexpand\pgfplots@serialized@afterpath{\the\t@pgfplots@tokc}%
+ \noexpand\def\noexpand\pgfplots@addplot@point@meta@description@of@explicit@value{\pgfplots@addplot@point@meta@description@of@explicit@value}%
}%
{% draw command:
\noexpand\path%
@@ -3550,11 +3644,12 @@
\t@pgfplots@tokc=\expandafter{\pgfplots@addplot@survey@@optionlist,%
/pgfplots/.cd,/pgfplots/every axis plot post}%
\edef\pgfplots@addplot@survey@@optionlist{\the\t@pgfplots@tokc}%
+ \edef\pgfplots@loc@TMPa{/pgfplots/every axis plot except legend/.code=,\the\t@pgfplots@tokc}%
\ifpgfplots@curplot@isirrelevant
% for \label commands:
\expandafter\pgfplots@rememberplotspec@for@label\expandafter{\pgfplots@addplot@survey@@optionlist}%
\else
- \expandafter\pgfplots@rememberplotspec\expandafter{\pgfplots@addplot@survey@@optionlist}%
+ \expandafter\pgfplots@rememberplotspec\expandafter{\pgfplots@loc@TMPa}%
\fi
}%
@@ -3639,7 +3734,11 @@
% SURVEY -- but not during a visualization. Check that here:
\if m\pgfplots@colormap@access
\else
- \pgfplots@LUA@survey@log@deactivation{color map access=direct not supported (yet)}%
+ \if c\pgfplots@colormap@access
+ \pgfplots@LUA@survey@log@deactivation{color map access=piecewise constant not supported (yet)}%
+ \else
+ \pgfplots@LUA@survey@log@deactivation{color map access=direct not supported (yet)}%
+ \fi
\pgfplots@LUA@backend@supportedfalse
\fi
%
@@ -3691,10 +3790,15 @@
\def\pgfplots@LUA@backend@serialized@commands{%
\noexpand\def\noexpand\pgfplots@LUA@backend@plotnum{\pgfplots@LUA@backend@plotnum}%
}%
+ \def\pgfplotsapplistXXpushback##1{%
+ \pgfplots@error{Illegal internal state encountered: lua backend should have been invoked at this point}%
+ }%
\fi
\fi
}%
+\let\pgfplotsapplistXXpushback@orig=\pgfplotsapplistXXpushback
+
\def\pgfplots@LUA@survey@point{%
\edef\pgfplots@loc@TMPa{pgfplots.texSurveyPoint("\pgfplots@current@point@x","\pgfplots@current@point@y","\pgfplots@current@point@z","\pgfplots@current@point@meta")}%
\pgfplotsutil@directlua{\pgfplots@loc@TMPa}%
@@ -3706,6 +3810,7 @@
% LUA defines a couple of TeX macros here...
\pgfplotsutil@directlua{pgfplots.texSurveyEnd()}%
%
+ \let\pgfplotsapplistXXpushback=\pgfplotsapplistXXpushback@orig
\pgfplotsapplistXXpushback{--- acquire from LUA! --}%
}%
@@ -3980,7 +4085,10 @@
% -> note the absence of extra braces for the deserialization!
\def\pgfplotsaxisserializedatapointtostring{%
\pgfplotsplothandlerserializepointto\pgfplotsaxisserializedatapoint@val
+ \let\pgfplots@oldprotect=\protect
+ \let\protect=\noexpand
\pgfplotsaxisserializedatapoint@private
+ \let\protect=\pgfplots@oldprotect
\t@pgfplots@toka=\expandafter{\pgfplotsaxisserializedatapoint@val}%
\t@pgfplots@tokb=\expandafter{\pgfplotsretval}%
\edef\pgfplotsretval{{\the\t@pgfplots@tokb;\the\t@pgfplots@toka}}%
@@ -4268,8 +4376,21 @@
\else
\def\pgfplots@perpointmeta@unboundedwarning##1{}%
\fi
- \if m\pgfplots@colormap@access
- % colormap access=map
+ \if d\pgfplots@colormap@access
+ % colormap access=direct
+ \def\pgfplots@perpointmeta@trafo##1{%
+ \pgfplotscoordmath{meta}{if is}{##1}{u}{%
+ \pgfplotscolorzero{\pgfplotscolormapcolorcompsof{\pgfkeysvalueof{/pgfplots/colormap name}}}%
+ \pgfplots@perpointmeta@unboundedwarning{##1}%
+ }{%
+ \pgfplotscoordmath{meta}{tofixed}{##1}%
+ \pgfplotscolormapgetindex{\pgfmathresult}{\pgfkeysvalueof{/pgfplots/colormap name}}%
+ }%
+ }%
+ \def\pgfplots@perpointmeta@traforange{0:0}%
+ \edef\pgfplotspointmetarange{\pgfplots@metamin:\pgfplots@metamax}%
+ \else
+ % colormap access=map|piecewise constant
\ifx\pgfplots@metamax\pgfutil@empty
\def\pgfplots@perpointmeta@trafo##1{%
\pgfplotscoordmath{meta}{if is}{##1}{u}
@@ -4295,18 +4416,6 @@
\pgfplots@perpointmeta@preparetrafo@initfrom{pgfplots@}%
\fi
\fi
- \else
- % colormap access=direct
- \def\pgfplots@perpointmeta@trafo##1{%
- \pgfplotscoordmath{meta}{if is}{##1}{u}{%
- \def\pgfmathresult{0}%
- \pgfplots@perpointmeta@unboundedwarning{##1}%
- }{%
- \pgfplotscoordmath{meta}{tofixed}{##1}%
- }%
- }%
- \def\pgfplots@perpointmeta@traforange{0:0}%
- \edef\pgfplotspointmetarange{\pgfplots@metamin:\pgfplots@metamax}%
\fi
\edef\pgfplotspointmetatransformedrange{\pgfplots@perpointmeta@traforange}%
}{}%
@@ -4406,7 +4515,15 @@
\else
% numeric point meta may NOT be empty.
\ifx\pgfplots@current@point@meta\pgfutil@empty%
- \pgfplots@error{could not access the 'point meta' (used for example by scatter plots and color maps). Maybe you need to add '\string\addplot[point meta=y]' or something like that?}%
+ \pgfplots@error{%
+ could not access the 'point meta=\csname pgfpmeta@\pgfplotspointmetainputhandler @tostring\endcsname' for coordinate \the\c@pgfplots@coordindex: %
+ its value is empty. %
+ \if1\csname pgfpmeta@\pgfplotspointmetainputhandler @explicitinput\endcsname%
+ \pgfplots@addplot@point@meta@description@of@explicit@value
+ \else
+ Please ensure that the value exists and is not empty
+ \fi
+ }%
\pgfplotscoordmath{meta}{one}%
\let\pgfplotspointmeta=\pgfmathresult
\def\pgfplotspointmetatransformed{1.0}%
@@ -4418,6 +4535,9 @@
\fi
\fi
}%
+\def\pgfplots@addplot@point@meta@description@of@explicit@value{%
+ Please use an input stream which provides 'explicit point meta' like \string\addplot\space table or \string\addplot\space coordinates
+}
\def\pgfplotsaxisvisphasetransformpointmetaifany{%
\pgfplotsaxisifhaspointmeta{\pgfplotsaxisvisphasetransformpointmeta}{}%
@@ -4895,8 +5015,14 @@
\def\pgfplots@addplot@survey@@optionlist{/pgfplots/every axis plot,/pgfplots/every forget plot}%
\pgfplotsset{/pgfplots/every forget plot,/pgfplots/every axis plot post}%
\else
- \edef\pgfplots@addplot@survey@@optionlist{/pgfplots/every axis plot,/pgfplots/every axis plot no \the\pgfplots@numplots/.try}%
- \pgfplotsset{/pgfplots/every axis plot no \the\pgfplots@numplots/.try,/pgfplots/every axis plot post}%
+ \edef\pgfplots@addplot@survey@@optionlist{%
+ /pgfplots/every axis plot,%
+ /pgfplots/every axis plot except legend,%
+ /pgfplots/every axis plot no \the\pgfplots@numplots/.try}%
+ \pgfplotsset{%
+ /pgfplots/every axis plot except legend,
+ /pgfplots/every axis plot no \the\pgfplots@numplots/.try,%
+ /pgfplots/every axis plot post}%
\fi
%
\t@pgfplots@tokc=\expandafter{\pgfplots@addplot@survey@@optionlist,#1}% this allows '#' inside of '#1'
@@ -5125,6 +5251,13 @@
\pgfkeysgetvalue{/pgfplots/samples at}\pgfplots@plot@samples@at
\pgfkeysgetvalue{/pgfplots/variable y}\pgfplots@plot@var@y
%
+ \ifx\pgfplots@plot@samples@y\pgfutil@empty
+ \else
+ \pgfplotscoordmath{default}{parse int}{\pgfplots@plot@samples@y}%
+ \let\pgfplots@plot@samples@y=\pgfmathresult
+ \pgfkeyslet{/pgfplots/samples y}{\pgfplots@plot@samples@y}%
+ \fi
+ %
% \tikz@plot@var is '\x' be default:
\pgfplots@gettikzinternal@keyval{variable}{tikz@plot@var}{\x}%
%
@@ -5208,6 +5341,7 @@
\fi
\if1\b@pgfplots@should@sample@LINE
\pgfkeyssetvalue{/pgfplots/sample dim}{1}%
+ \pgfkeyslet{/pgfplots/mesh/rows}\pgfplots@plot@samples
\pgfkeyssetvalue{/pgfplots/mesh/cols}{1}%
\else
\pgfkeyssetvalue{/pgfplots/sample dim}{2}%
@@ -5229,7 +5363,18 @@
\long\def\pgfplots@addplotimpl@expression@set@options#1#2{%
\def\pgfplotssurveyphaseinputclass{expression}%
- \pgfplots@start@plot@with@behavioroptions{#1,/pgfplots/.cd,#2,/pgfplots/mesh input=lattice,/pgfplots/mesh/ordering/x varies}%
+ \pgfplots@start@plot@with@behavioroptions{%
+ #1,%
+ /pgfplots/.cd,%
+ #2,%
+ /utils/exec={%
+ \if0\pgfplotsplothandlermesh@matrixinput
+ % mesh input=patches unsupported in this context.
+ \pgfkeysalso{/pgfplots/mesh input=lattice}%
+ \fi
+ },%
+ /pgfplots/mesh/ordering/x varies%
+ }%
\pgfplots@plot@expression@preparekeys
}%
@@ -5441,13 +5586,8 @@
\expandafter\def\pgfplots@plot@var@y{\pgfplots@plot@var@y@nonmacro}%
\expandafter\pgfplots@parse@domain\pgfplots@plot@domain\relax{pgfplots@plot@domain}%
%
- \pgfmathparse{\pgfplots@plot@samples}%
- \let\pgfplots@plot@samples=\pgfmathresult
- %
\if0\b@pgfplots@should@sample@LINE
\expandafter\pgfplots@parse@domain\pgfplots@plot@ydomain\relax{pgfplots@plot@ydomain}%
- \pgfmathparse{\pgfplots@plot@samples@y}%
- \let\pgfplots@plot@samples@y=\pgfmathresult
\else
\def\pgfplots@plot@ydomain@min{0}%
\def\pgfplots@plot@ydomain@max{0}%
@@ -6575,6 +6715,8 @@
\pgfplots@addplotimpl@table@check@createonuse@for{meta}%
\fi
%
+ \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@table%
+ %
\ifpgfplots@addplotimpl@readcompletely
\pgfplotstableread{#3}\pgfplots@table
\pgfplots@addplotimpl@table@fromstructure@{#1}{}{\pgfplots@table}{#4}%
@@ -6632,6 +6774,9 @@
\pgfplots@coord@stream@end
\fi
}
+\def\pgfplots@addplot@point@meta@description@of@explicit@value@table{%
+ Please add a non-empty value for \string\addplot\space table[meta=...]
+}%
\def\pgfplots@addplotimpl@table@check@createonuse@for#1{%
\pgfkeysgetvalue{/pgfplots/table/#1}\pgfplots@addplotimpl@table@check@createonuse@for@
\expandafter\pgfplotstableifiscreateonuse\expandafter{\pgfplots@addplotimpl@table@check@createonuse@for@}{%
@@ -6950,12 +7095,21 @@
\pgfplots@start@plot@with@behavioroptions{#1,/pgfplots/.cd,#2}%
\pgfplots@PREPARE@COORD@STREAM{#4}%
\ifpgfplots@curplot@threedim
+ \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@threedim
\pgfplots@coord@stream@foreach@threedim{#3}%
\else
+ \let\pgfplots@addplot@point@meta@description@of@explicit@value=\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@twodim
\pgfplots@coord@stream@foreach{#3}%
\fi
}%
+\def\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@twodim{%
+ Please add suffixes for every coordinate in order to specify explicit point meta. The suffixes must have the form '(x,y) [meta]'
+}%
+\def\pgfplots@addplot@point@meta@description@of@explicit@value@coordinates@threedim{%
+ Please add suffixes for every coordinate in order to specify explicit point meta. The suffixes must have the form '(x,y,z) [meta]'
+}%
+
{
% A block which handles active semicolons.
%
@@ -6996,7 +7150,7 @@
\let\pgfplots@addplotimpl@expression@curly=\pgfplots@addplotimpl@expression@curly@AS
\let\pgfplots@addplotimpl@function@opt=\pgfplots@addplotimpl@function@opt@AS
\let\pgfplots@addplotimpl@file@opt=\pgfplots@addplotimpl@file@opt@AS
- \let\pgfplots@addplotimpl@fillbetween@opt=\pgfplots@addplotimpl@file@opt@AS
+ \let\pgfplots@addplotimpl@fillbetween@opt=\pgfplots@addplotimpl@fillbetween@opt@AS
\let\pgfplots@addplotimpl@table@fromstructure=\pgfplots@addplotimpl@table@fromstructure@AS
\let\pgfplots@addplotimpl@table@fromfile=\pgfplots@addplotimpl@table@fromfile@AS
\let\pgfplots@addplotimpl@coordinates=\pgfplots@addplotimpl@coordinates@AS
@@ -7417,6 +7571,15 @@
}%
}%
+\def\pgfplots@addplot@define@plot@cycle@threedim{%
+ \def\pgfplots@path@closed@cycle@std{%
+ \pgfextra{%
+ \pgfpathlineto{\pgfplotsqpointxyz{\pgfplots@currentplot@lastcoord@x}{\pgfplots@currentplot@lastcoord@y}{\pgfplots@logical@ZERO@z}}%
+ \pgfpathlineto{\pgfplotsqpointxyz{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}{\pgfplots@logical@ZERO@z}}%
+ }%
+ -- cycle
+ }%
+}%
\def\pgfplots@addplot@get@named@startendpoints@command#1{%
\ifx\pgfplots@currentplot@firstcoord@x\pgfutil@empty
% empty plot.
@@ -7430,6 +7593,9 @@
\noexpand\pgfcoordinate{current plot begin}{\noexpand\pgfplotsqpointxyz{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}{\pgfplots@currentplot@firstcoord@z}}%
\noexpand\pgfcoordinate{current plot end}{\noexpand\pgfplotsqpointxyz{\pgfplots@currentplot@lastcoord@x}{\pgfplots@currentplot@lastcoord@y}{\pgfplots@currentplot@lastcoord@z}}%
}%
+ % FIXME : wouldn't this be a good idea for 2d axes as
+ % well!?
+ \pgfplots@addplot@define@plot@cycle@threedim
\else
\edef#1{%
\noexpand\pgfcoordinate{current plot begin}{\noexpand\pgfplotsqpointxy{\pgfplots@currentplot@firstcoord@x}{\pgfplots@currentplot@firstcoord@y}}%
@@ -8707,8 +8873,13 @@
\pgfmath@smuggleone\pgfplots@loc@TMPc
\endgroup
%
- \def\pgfplots@loc@TMPa{\pgfkeysvalueof{/pgfplots/plot graphics/includegraphics cmd}}%
- \expandafter\pgfplots@loc@TMPa\expandafter[\pgfplots@loc@TMPc]{\pgfplots@loc@TMPd}%
+ \t@pgfplots@toka=\expandafter{\pgfplots@loc@TMPc}%
+ \t@pgfplots@tokb=\expandafter{\pgfplots@loc@TMPd}%
+ \edef\pgfplots@loc@TMPc{%
+ \noexpand\pgfkeysvalueof{/pgfplots/plot graphics/includegraphics cmd}%
+ [\the\t@pgfplots@toka]
+ {\the\t@pgfplots@tokb}}%
+ \pgfplots@loc@TMPc
\fi
}%
@@ -8838,8 +9009,18 @@
% only need to know whether [xy] coordinates are sorted
% ascending or descending. This information is already ready.
%
- \if1\pgfplotsplothandlermesh@matrixinput
- % mesh input=lattice
+ \ifcase\pgfplotsplothandlermesh@matrixinput
+ % mesh input=patches
+ \ifpgfplots@threedim
+ \if\pgfplots@meshmode n%
+ \else
+ \pgfkeys{/pgfplots/z buffer=sort}%
+ \fi
+ \else
+ \pgfkeys{/pgfplots/z buffer=none}%
+ \fi
+ \else
+ % mesh input=lattice|image
\begingroup
\if+\pgfkeysvalueof{/pgfplots/x coord sorting}%
\def\pgfplots@minmaxvalue@x{0}%
@@ -8879,16 +9060,6 @@
\endgroup
% 'z buffer' is no longer 'auto' now:
\pgfplots@apply@zbuffer
- \else
- % mesh input=patches
- \ifpgfplots@threedim
- \if\pgfplots@meshmode n%
- \else
- \pgfkeys{/pgfplots/z buffer=sort}%
- \fi
- \else
- \pgfkeys{/pgfplots/z buffer=none}%
- \fi
\fi
\or
% z buffer=default.
@@ -8896,7 +9067,15 @@
% mesh mode deactivated!
\else
% mesh=true
- \pgfkeysalso{/pgfplots/z buffer=auto}%
+ \if2\pgfplotsplothandlermesh@matrixinput
+ % mesh input=image
+ % we do not want z buffering by default because it
+ % leads to undefined color associations.
+ % Use 'z buffer=auto' to re-enable it
+ \pgfkeys{/pgfplots/z buffer=none}%
+ \else
+ \pgfkeysalso{/pgfplots/z buffer=auto}%
+ \fi
\pgfplots@apply@zbuffer%
\fi
\fi