diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex index 450fa25878b..192d6a8abc0 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex @@ -389,6 +389,9 @@ \edef\pgfplotsplothandlername{\string##1}% \pgfmath@smuggleone\pgfplotsplothandlername \endgroup + % + \def\pgfplotsplothandlerLUAfactory{function(axis, pointmetainputhandler) return pgfplots.GenericPlothandler.new("\pgfplotsplothandlername", axis,pointmetainputhandler) end}% + \def\pgfplotsplothandlerLUAvisualizerfactory{pgfplots.defaultPlotVisualizerFactory}% }% }% % Patch all TikZ plot handlers: @@ -483,6 +486,8 @@ % This is necessary before installing a new plot handler! \def\pgfplotsresetplothandler{% \let\pgfplotsplothandlersurveystart=\pgfplotsplothandlersurveystart@default + \let\pgfplotsplothandlerLUAfactory=\pgfplotsplothandlerLUAfactory@default + \let\pgfplotsplothandlerLUAvisualizerfactory=\pgfplotsplothandlerLUAvisualizerfactory@default \let\pgfplotsplothandlername=\pgfplotsplothandlername@default \let\pgfplotsplothandlersurveyend=\pgfplotsplothandlersurveyend@default \let\pgfplotsplothandlersurveypoint=\pgfplotsplothandlersurveypoint@default @@ -513,6 +518,18 @@ [tikz@plot@handler: \meaning\pgf@plotstreamstart]% }% +% This should expand to a LUA function which takes the axis and the point +% meta handler. +% Use empty if there is none. +\def\pgfplotsplothandlerLUAfactory@default{}% + +% This should expand to a LUA function which takes an instance of +% Plothandler and which should return a PlotVisualizer. +% Use empty if there is none. +% +% @see LUA: pgfplots.PlotVisualizer +\def\pgfplotsplothandlerLUAvisualizerfactory@default{}% + % \pgfplotsplothandlerifcurrentpointcanbefirstlast : can be used to % check if the current point of a plot handler can be the global first % or last segment. @@ -539,6 +556,13 @@ % eventually). This DV engine stores data point entries in keys, % namely those in the key path /data point. See the pgf manual. \def\pgfplotsplothandlersurveypoint@default{% + \ifpgfplots@LUA@backend@supported + \pgfplots@LUA@survey@point + \else + \pgfplotsplothandlersurveypoint@default@ + \fi +}% +\def\pgfplotsplothandlersurveypoint@default@{% % reset it. NOTE: this migh be done multiple times. But better one % too much than one too few... \def\pgfplots@set@perpointmeta@done{0}% @@ -1096,12 +1120,12 @@ \E\let\E\pgfplots@current@point@x=\E\pgfmathresult % \E\expandafter\E\pgfplots@prepare@ycoord\E\expandafter{\E\pgfplots@current@point@y}% - \E\expandafter\E\pgfplots@invoke@filter\E\expandafter{\E\pgfmathresult}{y}% + \E\expandafter\E\pgfplots@invoke@filter\E\expandafter{\E\pgfplots@current@point@y}{y}% \E\let\E\pgfplots@current@point@y=\E\pgfmathresult % \ifpgfplots@curplot@threedim \E\expandafter\E\pgfplots@prepare@zcoord\E\expandafter{\E\pgfplots@current@point@z}% - \E\expandafter\E\pgfplots@invoke@filter\E\expandafter{\E\pgfmathresult}{z}% + \E\expandafter\E\pgfplots@invoke@filter\E\expandafter{\E\pgfplots@current@point@z}{z}% \E\let\E\pgfplots@current@point@z=\E\pgfmathresult \fi % @@ -1221,6 +1245,9 @@ quiver/u filter/.code=, quiver/v filter/.code=, quiver/w filter/.code=, + quiver/u filter/.expression/.code=\pgfplots@install@filter@expression{quiver/u filter}{#1}, + quiver/v filter/.expression/.code=\pgfplots@install@filter@expression{quiver/v filter}{#1}, + quiver/w filter/.expression/.code=\pgfplots@install@filter@expression{quiver/w filter}{#1}, quiver/u value/.code =\pgfplots@set@source@for{quiver/u}{#1}{0},% quiver/u/.code =\pgfplots@set@source@for{quiver/u}{#1}{1},% quiver/v value/.code =\pgfplots@set@source@for{quiver/v}{#1}{0},% @@ -1403,6 +1430,7 @@ \let\pgfplotsplothandlerdeserializepointfrom=\pgfplotsplothandlerdeserializepointfrom@quiver \let\pgfplotsplothandlerpointtokeys=\pgfplotsplothandlerpointtokeys@quiver \let\pgfplotsplothandlerquiver@vis@hook=\pgfutil@empty + \def\pgfplotsplothandlername{quiver}% % \ifpgfplots@xislinear \else \pgfplotsplothandlerquivererror \fi \ifpgfplots@yislinear \else \pgfplotsplothandlerquivererror\fi @@ -1523,7 +1551,7 @@ \fi \else % 'every arrow' should provide a high level user interface. - % Use tikz instead of pgf. This is slower, but more powerfull. + % Use tikz instead of pgf. This is slower, but more powerful. \pgfplots@quiver@usetikztrue \pgfplotsaxisifhaspointmeta{% % ASSERT(mapped color is available) @@ -1585,6 +1613,7 @@ hist/data value/.code =\pgfplots@set@source@for{hist/data}{#1}{0},% hist/data/.code =\pgfplots@set@source@for{hist/data}{#1}{1},% hist/data filter/.code=, + hist/data filter/.expression/.code=\pgfplots@install@filter@expression{hist/data filter}{#1}, hist/data value=\pgfkeysvalueof{/data point/y}, % hist/data=y, hist/data min/.initial=\pgfkeysvalueof{/pgfplots/xmin}, @@ -1909,7 +1938,7 @@ contour prepared/.code={% \let\tikz@plot@handler=\pgfplotsplothandlercontourprepared \pgfqkeys{/pgfplots/contour}{% - every contour plot, + every contour plot,% #1,% }% }, @@ -1994,7 +2023,7 @@ contour external/.code={% \edef\tikz@plot@handler{\noexpand\pgfplotsplothandlercontourexternal}% \pgfqkeys{/pgfplots/contour external}{% - every contour plot, + every contour plot,% #1% }% }, @@ -2024,7 +2053,7 @@ set table \"\outfile\"; splot \"\infile\"; }, - cmd={gnuplot \"\script\"}, + cmd={gnuplot \"\script\"},% #1,% }, }, @@ -2057,7 +2086,8 @@ \pgfplotsplothandlersurveyaftersetpointmeta@default % ... and undo the reordering after point meta has been set: \pgfplotsplothandlersurveypoint@contour@axes@reordered@to@std - } + }% + \def\pgfplotsplothandlername{contour prepared}% }% \def\pgfplotsplothandlersurveystart@contour{% |