diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex index e6d957d842d..60d6274eb5e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/pgfplotsmeshplothandler.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 2007-2015 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/>. % @@ -26,7 +26,7 @@ % The low-level tikz plot handler for 3D mesh and surface plots. % -% It expects +% 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/. @@ -55,7 +55,7 @@ % 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 +% 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. @@ -76,24 +76,24 @@ % mesh/rows=4, % mesh/cols=4, % mesh/num points=, -% /tikz/x={(0.44237cm,-0.07439cm)}, +% /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 @@ -102,31 +102,31 @@ % % 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} % ---------------------------------------------------------- @@ -199,7 +199,7 @@ \fi \fi % - % + % \pgfplotsifisvisualizationphase{% \pgfplotsplothandlermesh@init@variables }{}% @@ -223,7 +223,7 @@ % % Prepare color data source: \ifx\pgfplotspointmetainputhandler\pgfutil@empty% - % oh. There is no color data!? + % oh. There is no color data!? \pgfplotsplothandlermesh@init@path@without@point@meta % \else @@ -362,7 +362,7 @@ % -> perhaps the check can be skipped entirely. % % oh. shading type=5 is *essentially* the same as - % matrix output, but matrix output is forbidden. + % matrix output, but matrix output is forbidden. % In that case, triangulate the matrix and shade the % triangles: \def\pgfplotsplothandlermesh@triangulate{1}% @@ -381,7 +381,7 @@ \else \edef\pgfplotsplothandlerLUAvisualizerfactory{ function(plothandler) return pgfplots.MeshVisualizer.new( - plothandler, + plothandler, \pgfplotsretval(), pgfplots.pgftonumber("\pgfkeysvalueof{/pgfplots/mesh/rows}"), pgfplots.pgftonumber("\pgfkeysvalueof{/pgfplots/mesh/cols}"), @@ -403,7 +403,7 @@ % % PRECONDITION: % The values of -% - '/pgfplots/mesh/rows' +% - '/pgfplots/mesh/rows' % - '/pgfplots/mesh/cols' % - '/pgfplots/mesh/num points' % - \pgfplotsscanlinelength @@ -429,12 +429,12 @@ % % PRECONDITION: % The values of -% - '/pgfplots/mesh/rows' +% - '/pgfplots/mesh/rows' % - '/pgfplots/mesh/cols' % - '/pgfplots/mesh/num points' % - '/pgfplots/mesh/ordering' % are assigned properly. -% If +% If % - \pgfplotsscanlinelength % exists and is positive, it may also be used. % @@ -537,7 +537,7 @@ \pgfplotswarning{matrix delinearize uses sqrt}{\pgfplotsplothandlermesh@rows}{\pgfplotsplothandlermesh@cols}{\pgfplotsplothandlermesh@numpoints}{\pgfmathresult}\pgfeov% \else \pgfplots@error{Sorry, 'plot mesh' needs either '[mesh/rows=<N>]' or '[mesh/cols=<N>]' set, - but it did not find any of them. + but it did not find any of them. I also tried rows = sqrt(num points) = sqrt(\pgfplotsplothandlermesh@numpoints) = \pgfmathresult\space without success.}% \fi \pgfmath@smuggleone\pgfplotsplothandlermesh@rows @@ -616,7 +616,7 @@ \expandafter\pgfplots@loc@TMPa\expandafter{\pgfplotsplothandlermesh@cols}% }% -%% +%% %% Helper structs for patch plots (surfaces) % #1: the canvas x coordinate @@ -634,7 +634,7 @@ }% % Assumes that #1 expands to an argument of \pgfplotspatchvertex and -% that #2 is a macro containing another patch vertex. +% that #2 is a macro containing another patch vertex. % % It then replaces #2 by a new vector which is equal to #2 except for % the point meta which is taken from #1. @@ -858,7 +858,7 @@ }% % Declares a new patch class named #1. -% +% % #1: a string name. % #2: methods defining the class, provided as key values. See the % predefined classes to adjust your own ones. Documentation about the @@ -1011,7 +1011,7 @@ % 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 @@ -1019,8 +1019,8 @@ % \pgfplotspatchready will be invoked. % % - % PRECONDITION: - % -\pgfplotspatchready is defined. + % PRECONDITION: + % -\pgfplotspatchready is defined. % % Arguments: % #1: code which will be invoked whenever a new coordinate is @@ -1078,14 +1078,14 @@ first vertex before z buffer/.code= {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ first vertex before z buffer\endcsname{#1}},% % - % invokes + % invokes % \pgfplotspatchvertex...\endvertex % #1 % for the every vertex. foreach vertex/.code= {\expandafter\def\csname pgfpptch\pgfplotsdeclarepatchclass@ foreach vertex\endcsname##1{#1}},% % - % invokes + % invokes % \pgfplotspatchvertex...\endvertex % #1 % for every colored vertex. @@ -1182,7 +1182,7 @@ % A method which defines \pgfplotsretval to be the normal of the current segment. % The values will be given in a format understood by % \pgfplotsmathvectortostring{\pgfplotsretval}{default} - % + % % 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}},% @@ -1593,7 +1593,7 @@ % reverse xy seq \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@C \or - % sort + % sort \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A \else % the choices 'default' or 'auto' should have been expanded already. Nothing to do here: @@ -1614,7 +1614,7 @@ % reverse xy seq \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@C \or - % sort + % sort \let\pgfplots@loc@TMPa\pgfplotspatchclass@rect@A \else % the choices 'default' or 'auto' should have been expanded already. Nothing to do here: @@ -1628,8 +1628,8 @@ % D <-- C % | ^ % v | -% A --> B -% +% A --> B +% \pgfplotsdeclarepatchclass{rectangle}{% allow matrix=\def\pgfplotsretval{1}, new=\def\pgfplotspatchclass@rect@no{0}, @@ -1758,7 +1758,7 @@ % Furthermore, for fixed v, the 'u=1' point should belong % to the foreground (as it is drawn on top of u=0). % -% In other words, if the coons patch looks like +% In other words, if the coons patch looks like % % BB-------CC <--v=1 % | | @@ -1769,7 +1769,7 @@ % u=0 u=1 % % where the AA,BB,CC,DD are the corners of the coons -% patch, The FOREGROUND POINT of our visualization here should be CC, +% patch, The FOREGROUND POINT of our visualization here should be CC, % the second most foreground point BB (assuming that % foreground point and second most foreground point are % adjacent). @@ -1796,7 +1796,7 @@ % % Note that this method works also for biquadratic patches since these % patches also have #1A, #1B, #1C and #1D as their corners. -% +% \def\pgfplotspatchclass@rect@to@coonspatch@findshadingsequence@for@depth#1#2#3{% \def#2{A}% \def#3{}% @@ -1862,7 +1862,7 @@ \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 @@ -2094,7 +2094,7 @@ % mesh input=lattice|image % Init memory: % - % And now finally: initialise the conversion from + % And now finally: initialise the conversion from % LINEARIZED COORD STREAM -> DATA MATRIX: \if\pgfplots@plot@mesh@ordering0% % x varies (=rowwise): @@ -2285,12 +2285,12 @@ } % Invokes \pgfplotsscanlinecomplete if the scanline is complete according to the keys 'mesh/rows' and/or 'mesh/cols' -% +% % This routine improves the precision of the scanline computation, but not much. % At the time of this writing, its only purpose is to help 'matrix input=image' % as that requires information about the current scanline in order to update its % axis limits. -% +% % Note that this macro is unnecessary in many cases: if the user input _contains_ end-of-scanline markers, it is redundant. % % Limitations of this routine: @@ -2339,7 +2339,7 @@ % \ifpgfplotsplothandlermesh@needs@scanlinecomplete@notifications % - % OK, we EXPECT that the code generated + % OK, we EXPECT that the code generated % notifications of sorts \pgfplotsscanlinecomplete. % % If this turns out to be NOT the case, we generate a @@ -2351,7 +2351,7 @@ % input has been surveyed) % 2. OR \pgfplotsscanlinecomplete has been called due to scan % line length comparison with mesh/cols or mesh/rows. In this - % case, the required argument must have been set, see + % case, the required argument must have been set, see % \pgfplotsplothandlersurveypoint@mesh@check@scanline@length@init % \ifnum\c@pgfplotsplothandlermesh@image@numscanlines<2 @@ -2386,7 +2386,7 @@ \fi }% -\def\pgfplotsplothandlersurveyaftersetpointmeta@mesh@cdatanormalize{% +\def\pgfplotsplothandlersurveyaftersetpointmeta@mesh@cdatanormalize{% \pgfplotsplothandlersurveyaftersetpointmeta@default \if0\pgfplotsplothandlermesh@colorinput % mesh/color input=colormap @@ -2691,7 +2691,7 @@ % mesh/color input=colormap \if d\pgfplots@colormap@access % colormap access=direct - % we assume that the color *is* already normalized, + % we assume that the color *is* already normalized, % i.e. it is {<comma-separate-components>} and to be % interpreted in the correct color space. \edef\pgfplots@loc@TMPb{% @@ -2707,7 +2707,7 @@ \else % mesh/color input=explicit % - % we assume that the color *is* already normalized, + % we assume that the color *is* already normalized, % i.e. it is {<comma-separate-components>} and to be % interpreted in the correct color space. \edef\pgfplots@loc@TMPb{% @@ -2787,8 +2787,8 @@ % nor in two dimensions. \pgfkeyssetvalue{/pgfplots/surf shading/anchor}{\pgfpointorigin}% % - % do NOT update the picture's BB using the streamed low-level coordinates - % (which are bezier control points in most cases). + % do NOT update the picture's BB using the streamed low-level coordinates + % (which are bezier control points in most cases). % We do that on our own using the input vertices. \pgfkeys{/pgfplots/surf shading/update BB=false}% \if1\b@pgfplotsplothandlermesh@matrixoutput @@ -2841,7 +2841,7 @@ % ordering=x varies: % nothing special to do \else - % FIXME + % FIXME % [this happens only for mesh input=lattice] % colwise: % @@ -2956,7 +2956,7 @@ % segment. \let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathstroke \else - % 'surf' plot: + % 'surf' plot: \let\pgfplotsplothandlermesh@usepath=\pgfplotsplothandlermeshusepathfillstroke \if\pgfplotsplothandlermesh@shader3% faceted interp % it has an extra fill command (shading) @@ -3120,7 +3120,7 @@ \fi % \if 1\pgfplots@loc@TMPa - % ok, this uses (only) 'shader=flat' + % ok, this uses (only) 'shader=flat' \if c\pgfplotsplothandlermesh@flatmode % 'flat corner': \if1\b@pgfplots@correct@shader@flat @@ -3174,7 +3174,7 @@ \let\pgfplotsplothandlermesh@compute@vertex@depth=\pgfplotsplothandlermesh@compute@vertex@depth@doit% % % the "element depth" is defined to be the MEAN of all - % vertex depths. + % vertex depths. % And since the mean is 1/n * sum_{i=1}^n V_i, we can % directly omit the 1/n --- it is the same for every % vertex anyway, and we only want to compare the depth @@ -3269,7 +3269,7 @@ /pgfplots/mesh input=lattice, /pgfplots/patch type=rectangle, /pgfplots/z buffer=default, - /tikz/x={(0.44237cm,-0.07439cm)}, + /tikz/x={(0.44237cm,-0.07439cm)}, /tikz/y={(0.30942cm,0.23932cm)}, /tikz/z={(0.0cm,1.5cm)}, scale=0.4, @@ -3406,7 +3406,7 @@ % get (i-1, j) from front of deque // remember: i: rows, j : cols. We iterate rowwise. % push (i,j) to back of deque % if j > 0 -% draw +% draw % (i-1,j-1) [from last iteration] -- (i-1,j ) [from deque] % -- ( i,j ) [from last iteration] -- (i ,j-1) [from #1] % -- cycle @@ -3421,7 +3421,7 @@ % #2: a callback (TeX code) which will be executed for each point with j>0 % #3: a callback (TeX code) which will be executed if the scanline is completed, i.e. j=cols \def\pgfplotsplothandlermesh@PIPE@DECODE@matrix@collect@and@callback#1#2#3{% - % NOTATION: + % NOTATION: % 'im == (i-1)' % 'jm == (j-1)' \pgfplotsplothandlermesh@compute@vertex@depth% <-- this modifies \pgfplotsretval |