diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-05 23:09:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-05 23:09:50 +0000 |
commit | 327cd87d4221068ab573a3504626efee4617a231 (patch) | |
tree | 38428d40c974abbc49cc1a156e8c6eb1f0c7f20c /Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex | |
parent | 3b20e2fc53faaae132472dfb561107e62079a95e (diff) |
pgfplots (5jun17)
git-svn-id: svn://tug.org/texlive/trunk@44469 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex index f3b28374d07..f10082afb32 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsplothandlers.code.tex @@ -4,7 +4,7 @@ % % Provides a user-friendly interface to create function plots (normal % plots, semi-logplots and double-logplots). -% +% % It is based on Till Tantau's PGF package. % % Copyright 2010 by Christian Feuersänger. @@ -13,12 +13,12 @@ % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. -% +% % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. -% +% % You should have received a copy of the GNU General Public License % along with this program. If not, see <http://www.gnu.org/licenses/>. % @@ -68,7 +68,7 @@ % \pgfplotstreamstart % foreach <serizalized point> { % \pgfplotsplothandlerdeserializepointfrom{<serialized point>} -% apply data transformations +% apply data transformations % handle plot marks % \pgfplotstreampoint{\pgfplotsqpointxy{<x>}{<y}} % } @@ -148,7 +148,7 @@ % coordinates. But it may be more complex. % % So, the coordinate input routine provides whatever the user has -% chosen. Let's assume, we are using \addplot table. Then, we can +% chosen. Let's assume, we are using \addplot table. Then, we can % access every cell in the current row (using \thisrow{<colname>} for % example). The plot handler knows how to extract its information from % this state. In general, the following steps are taken: @@ -159,7 +159,7 @@ % \pgfplotsaxisparsecoordinate{} % This will apply coordinate filters, parse the single coordinates % and apply high level transformations and any logarithms. -% It is some sort of advanced coordinate parser which works only for +% It is some sort of advanced coordinate parser which works only for % (x,y) or for (x,y,z). % It yields (x,y,z). But the axis might need to change its % components! Thus, you also need to call @@ -191,12 +191,12 @@ % point as "readily surveyed". It is allowed if this does *not* % happen inside of \pgfplotsplothandlersurveypoint, but it must % happen before \pgfplotsplothandlersurveyend is finished. -% +% % The plot handler invokes \pgfplotsaxisdatapointsurveyed. % This tells the axis that it can perform its own surveying tasks % (see below) and furthermore, that it can serialize the data point. % Consequently, it will invoke -% \pgfplotsplothandlerserializepointto{<\macro>} +% \pgfplotsplothandlerserializepointto{<\macro>} % and it will remember that \macro internally. This serialization is % employed to place plot marks and to apply z buffering techniques % (that's why it is done by the axis and not by the plot handler on @@ -340,7 +340,7 @@ % % For example: % \pgfplotsplothandlers@get@tikz@backup@name{\pgfplothandlerlineto} -% will return \pgfplotsretval={\\pgfplothandlerlineto@tikz} +% will return \pgfplotsretval={\\pgfplothandlerlineto@tikz} % (up to \escapechar) \def\pgfplotsplothandlers@get@tikz@backup@name#1{% \begingroup @@ -363,7 +363,7 @@ % ... get the name of the backup (see \pgfplotsplothandlers@init) \expandafter\pgfplotsplothandlers@get@tikz@backup@name\pgfplots@loc@TMPa \expandafter\ifx\pgfplotsretval\tikz@plot@handler - % AH! \tikz@plot@handler is the same as some backup name! + % AH! \tikz@plot@handler is the same as some backup name! % Replace it: \expandafter\let\expandafter\tikz@plot@handler\pgfplots@loc@TMPa \fi @@ -468,7 +468,7 @@ \let\pgfplots@loc@TMPa=\pgfmathresult \csname pgfplotstransformdirection\pgfplots@bar@direction@choice@\endcsname{\pgfplots@loc@TMPa}% \let\pgfplots@loc@TMPa=\pgfmathresult - \if\pgfplots@bar@direction@choice@ x% + \if\pgfplots@bar@direction@choice@ x% \pgfqpointxy@orig{\pgfplots@loc@TMPa}{0}% \edef\pgfmathresult{\pgf@sys@tonumber\pgf@x}% \else @@ -523,7 +523,7 @@ }% % This should expand to a LUA function which takes the axis and the point -% meta handler. +% meta handler. % Use empty if there is none. \def\pgfplotsplothandlerLUAfactory@default{}% @@ -565,7 +565,7 @@ % The data point as such is available using the current state of any % macros which are assigned during the survey phase (during \addplot). % This includes any table macros etc. -% PGFPlots stores the x,y and z coordinates into \pgfplots@current@point@[xyz]. +% PGFPlots stores the x,y and z coordinates into \pgfplots@current@point@[xyz]. % The point meta coordinate is in \pgfplots@current@point@meta. % % Note that since any currently assigned macro can be used here, the @@ -615,7 +615,7 @@ % Store normalized point for list: % We need % xi,yi,zi; - % where zi may be empty. + % where zi may be empty. % % Note that per-point meta information is stored in % \pgfplotsaxisserializedatapoint . @@ -726,7 +726,7 @@ % \pgfplotsplothandlersurveydifflen#1#2 % % computes the length between two points which are given in logical -% coordinates. +% coordinates. % #1 a serialized point % #2 a serialized point % @@ -791,7 +791,7 @@ \advance\pgf@y by-\pgf@ya% \ifpgfallowupsidedownattime% \else% - \ifdim\pgf@x<0pt% + \ifdim\pgf@x<0pt% \pgf@x=-\pgf@x% \pgf@y=-\pgf@y% \fi% @@ -830,7 +830,7 @@ }% % ================================== -% Defines +% Defines % - a generic update limits routine, % \pgfplotsaxisupdatelimitsforcoordinate#1#2#3 % if #3 is empty, it will assume a 2d point, otherwise a 3d point @@ -897,7 +897,7 @@ %\E\tracingmacros=2\E\tracingcommands=2 %\E\pgfplots@message{Updating limits for (##1,##2) ...}% % - % VIM SEARCH PATTERN: + % VIM SEARCH PATTERN: % [^E]\zs\\\ze[^E] % -> this finds '\' which is neither '\E' nor is it prefixed % by 'E'. @@ -906,7 +906,7 @@ % \E\pgfplots@update@limits@for@one@point@ISCLIPPEDfalse % check whether we need to clip limits: - \ifpgfplots@clip@limits + \ifpgfplots@clip@limits@x \ifpgfplots@autocompute@xmin \else \ifpgfplots@xislinear @@ -935,6 +935,8 @@ \E\fi \fi \fi + \fi + \ifpgfplots@clip@limits@y \ifpgfplots@autocompute@ymin \else \ifpgfplots@yislinear @@ -963,6 +965,8 @@ \E\fi \fi \fi + \fi + \ifpgfplots@clip@limits@z \ifpgfplots@curplot@threedim \ifpgfplots@autocompute@zmin \else @@ -1103,7 +1107,7 @@ % multiple times for a single data "point" (for example, a quiver % point might call it for the point where the vector starts and % where the vector ends). - % + % % @PRECONDITION % - the plot's survey phase is running (has already been started) % - \pgfplots@current@point@[xyz] contains the coordinates of the @@ -1218,7 +1222,7 @@ % Its input is (x_i,y_i); (u_i,v_i) for data point i and it draws a % vector in direction (u_i,v_i) starting from (x_i,y_i) . % It also supports 3D arrows (involving z_i and w_i). - + \newif\ifpgfplots@quiver@usetikz \newif\ifpgfplots@quiver@updatelimits @@ -1227,7 +1231,7 @@ % % User Interface: % use /pgfplots/quiver to enable the plot handler. - % Then, provide `quiver/u value' or `quiver/u' to + % Then, provide `quiver/u value' or `quiver/u' to % tell where to find the 'x' coordinates of the vectors, and similarly % for 'v' and 'w' instead of 'u'. quiver/.code={% @@ -1253,9 +1257,9 @@ \def\pgfplots@quiver@v{1}% \def\pgfplots@quiver@w{1}% },% - ] + ] plot coordinates { - (0cm,0cm) + (0cm,0cm) };% }% }, @@ -1647,8 +1651,8 @@ hist/density=false, hist/handler/.style={/tikz/ybar interval}, hist/symbolic coords/.style={% - /pgfplots/symbolic coords={hist/data}{A,B,C,D,E,F,G,H,I,J}, - /pgfplots/symbolic coords={x}{A,B,C,D,E,F,G,H,I,J}, + /pgfplots/symbolic coords={hist/data}{#1}, + /pgfplots/symbolic coords={x}{#1}, },% }% \def\pgfplotsplothandlerhistogram{% @@ -1779,11 +1783,11 @@ \expandafter\pgfplotsplothandlersurveyend@hist@loop\pgfplots@hist@data\pgfplots@EOI \let\pgfplots@hist@data=\relax % - + % Calculate total count \c@pgf@counta=0 \pgfplotsarrayforeachungrouped{pgfp@hist}\as\pgfplots@hist@count{% - \advance\c@pgf@counta by\pgfplots@hist@count\relax + \advance\c@pgf@counta by\pgfplots@hist@count\relax \def\pgfplots@loc@TMPa{\pgfplotsarrayset{\pgfplotsarrayforeachindex}\of{pgfp@hist}\to}% }% \pgfmathfloatparsenumber{\the\c@pgf@counta}% @@ -1814,11 +1818,11 @@ \else \pgfmathfloatmultiply@{\pgfp@hist@totalcount@inv}{\pgfplotsplothandlerhistogram@invh}% \let\pgfp@hist@totalcount@times@h@inv=\pgfmathresult -% FIXME : this here is a patch suggestion for +% FIXME : this here is a patch suggestion for % https://sourceforge.net/tracker/?func=detail&atid=1060656&aid=3609245&group_id=224188 % % FIXME : this line would actually compute relative frequencies... -% might not be too bad at all, but is no density +% might not be too bad at all, but is no density %\let\pgfp@hist@totalcount@times@h@inv=\pgfp@hist@totalcount@inv \pgfplotsarrayforeachungrouped{pgfp@hist}\as\pgfplots@hist@count{% \pgfmathfloatparsenumber{\pgfplots@hist@count}% @@ -1864,7 +1868,7 @@ % This here might be inefficient, because % there needs to be a compatible "x coord trafo" as well -- and % that transformation will (most likely) do the very same thing as - % the hist/data coord trafo. + % the hist/data coord trafo. % % But I did not find a way to combine the transformations % automatically without resorting to hackery. @@ -1988,7 +1992,7 @@ },% contour/labels/.is if=pgfplotsplothandlercontour@labels, contour/labels=true, - % + % % XXX : this here is dead code... it has been superseded by % \pgfplotsplothandlercontourfilled: contour/filled/.is if=pgfplotsplothandlercontour@filled, @@ -2078,14 +2082,14 @@ contour external={% scanline marks=required, script={ - unset surface; + unset surface; \ifx\thecontourlevels\empty set cntrparam levels \thecontournumber; \else set cntrparam levels discrete \thecontourlevels; \fi - set contour; - set table \"\outfile\"; + set contour; + set table \"\outfile\"; splot \"\infile\"; }, cmd={gnuplot \"\script\"},% @@ -2524,7 +2528,7 @@ \let\pgfplotsplothandlercontour@lastlastcanvas=\pgfutil@empty \ifpgfplotsplothandlercontour@labels \def\pgfplotsplothandlercontour@haslabel{0}% - % + % % this here means that 20% of labeldist are already there. % it moves the first label nearer to its start. \pgf@xa=\pgfplotsplothandlercontour@labeldist\relax @@ -2664,7 +2668,7 @@ % \if0\pgfplotsplothandlercontourexternal@scanlinemode \pgfplotsset{plot to file/scanline marks/false}% - \else + \else \pgfplotsset{plot to file/scanline marks/if in input}% the choice 'always' is unaware of existing end-of-scanline marks \fi \pgfplotsplothandlertofile{\pgfplotsplothandlercontourexternal@file.dat}% @@ -2805,7 +2809,7 @@ }% } - + @@ -2994,11 +2998,11 @@ % \pgfkeysgetvalue{/pgfplots/contour/levels}\pgfplots@loc@TMPa \ifx\pgfplots@loc@TMPa\pgfutil@empty - % no levels. + % no levels. % Ok, check the other keys in the order of precedence: \pgfkeysgetvalue{/pgfplots/contour/levels from colormap}\pgfplots@loc@TMPa \ifx\pgfplots@loc@TMPa\pgfutil@empty - % no 'levels from colormap'. + % no 'levels from colormap'. % Ok, check the other keys in the order of precedence: \pgfkeysgetvalue{/pgfplots/contour/number}\pgfplots@loc@TMPa \ifx\pgfplots@loc@TMPa\pgfutil@empty @@ -3077,5 +3081,3 @@ %\message{contour filled: assembled options \meaning\pgfplots@contour@cm@options^^J}% \fi }% - - |