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/numtable/pgfplotstable.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/numtable/pgfplotstable.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex | 77 |
1 files changed, 42 insertions, 35 deletions
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 a85aa649329..5812550a4fc 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/numtable/pgfplotstable.code.tex @@ -2,7 +2,7 @@ % % Package pgfplotstable % -% Provides support to read and work with abstact numeric tables of the +% Provides support to read and work with abstract numeric tables of the % form % % COLUMN1 COLUMN2 COLUMN3 @@ -17,12 +17,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/>. % @@ -97,7 +97,7 @@ \ifnum\c@pgfplotstable@rowindex<\pgfplotstablerows\relax \c@pgfplotstable@colindex=\pgfplotstablerows\relax \advance\c@pgfplotstable@colindex by-\c@pgfplotstable@rowindex - \advance\c@pgfplotstable@colindex by\pgfplotstablepartsize + \advance\c@pgfplotstable@colindex by\pgfplotstablepartsize \edef\pgfplotstablepartsize{\the\c@pgfplotstable@colindex}% \fi % @@ -183,10 +183,10 @@ % columns={[index]2,name2,name3,[index]5} /pgfplots/table/columns/.initial=, % - % this choice allows + % this choice allows % \pgfplotstableset{ % column name={}, % means: the column's display name is an empty string! - % column name=\pgfkeysnovalue, % means: no value specified. In this case, + % column name=\pgfkeysnovalue, % means: no value specified. In this case, % the column's display name will default to column's name. % } /pgfplots/table/column name/.initial=\pgfkeysnovalue, @@ -266,7 +266,7 @@ % if the 'process' key hadn't been invoked. % It will, however, use the current value of \pgfmathresult. % - % If \continue is NOT empty, for example \def\continue{0}, + % If \continue is NOT empty, for example \def\continue{0}, % `dec sep align' assumes that \pgfmathresult contains the % completely typeset cell, including any alignment material. /pgfplots/table/dec sep align/process/.code=,% @@ -407,8 +407,13 @@ }% },% /pgfplots/table/verb string type/.style={% + /pgfplots/table/text special chars={\#,\|},% FIXME: too limited ... /pgfplots/table/assign cell content/.code={% \def\pgfplotstable@loc@TMPa{##1}% + % hm... this here might be more robust instead of the line + % above. But not much, I suppose: + %\t@pgfplotstable@a={##1}% + %\edef\pgfplotstable@loc@TMPa{\the\t@pgfplotstable@a}% \pgfplots@command@to@string\pgfplotstable@loc@TMPa\pgfplotstable@loc@TMPa \pgfkeyslet{/pgfplots/table/@cell content}{\pgfplotstable@loc@TMPa}% }% @@ -599,7 +604,7 @@ % \let\pgfplots@table@curkeyname=\pgfkeyscurrentname % \pgfqkeys{/pgf/number format}{\pgfplots@table@curkeyname=#1}% % },% - %-------------------------------------------------- + %-------------------------------------------------- /pgfplots/table/create col/assign first/.style={ /pgfplots/table/create col/assign% }, @@ -937,7 +942,7 @@ /pgfplots/table/every last column/.code=, /pgfplots/table/every head row/.code=, /pgfplots/table/every odd row/.code=, - /pgfplots/table/every even row/.code=,± + /pgfplots/table/every even row/.code=, /pgfplots/table/every first row/.code=, /pgfplots/table/every last row/.code=, /pgfplots/table/postproc cell content/.code=, @@ -958,7 +963,7 @@ % % fills the column with x1,...,xN such that yi(xi) == epsilon where % -% In other words, it computes cuts points between the line +% In other words, it computes cuts points between the line % y == epsilon and one or more other plots yi(x) and returns the 'x' % values of the cuts. % @@ -989,7 +994,7 @@ % A helper macro to automatically remove the "hangover" created by % 'colortbl'. -% This allows compatibility between my 'sci sep align' and 'dec sep align' +% This allows compatibility between my 'sci sep align' and 'dec sep align' % implementations and \rowcolor. Otherwise, the hangover % would overwrite digits near the separator. % @@ -1101,7 +1106,7 @@ ]{#2}% }% -% clears the table. +% clears the table. \def\pgfplotstableclear#1{% \let#1=\relax \expandafter\let\csname \string#1@@table@name\endcsname=\relax @@ -1111,7 +1116,7 @@ % \pgfplotstablenew[<options>]{<numrows>}{<\name>} % \pgfplotstablenew*[<options>]{<numrows>}{<\name>} % -% Creates a new table from scratch. +% Creates a new table from scratch. % % The new table will contain all columns listed in the 'columns' key % which must be present in <options>. The starred version @@ -1211,7 +1216,7 @@ \pgfplotslistforeachungrouped\pgfplotstable@loc@TMPb\as\pgfplotstable@loc@TMPc{% \t@pgfplots@toka=\expandafter{\pgfplotstable@loc@TMPc}% \edef\pgfplotstable@loc@TMPd{% - \noexpand\pgfplotslistpushback{\the\t@pgfplots@toka}\to\expandafter\noexpand\csname\string#1@\pgfplotstable@loc@TMPa\endcsname + \noexpand\pgfplotslistpushback{\the\t@pgfplots@toka}\noexpand\to\expandafter\noexpand\csname\string#1@\pgfplotstable@loc@TMPa\endcsname }% \pgfplotstable@loc@TMPd }% @@ -1228,7 +1233,7 @@ % \pgfplotstabletranspose{<\outtable>}{<intable>} % \pgfplotstabletranspose[<colname>]{<\outtable>}{<intable>} -% Defines <\outtable> to be the transposed of <intable>. +% Defines <\outtable> to be the transposed of <intable>. % % If <colname> is not empty, the respective column's entries will be used to % make output column names. @@ -1258,12 +1263,12 @@ % Creates a new column named #1 and appends it to table #2. % % The column entries will be created using the command keys -% 'create col/assign' +% 'create col/assign' % 'create col/assign last' % % The key 'create col/assign' will be invoked for every row of table #2. % It is supposed to assign the key 'create col/next content'. -% During evaluation of 'create col/assign', the macro '\thisrow{<col name>}' +% During evaluation of 'create col/assign', the macro '\thisrow{<col name>}' % expands to the current row's value of the column named by <col name>. % Furthermore, '\nextrow{<col name>}' expands to the \emph{next} row's % value of the designated column. @@ -1273,9 +1278,9 @@ % value. % % You can use -% - \thisrow{<col name>}, +% - \thisrow{<col name>}, % - \getthisrow{<col name>}{\macro} -% - \nextrow{<col name>}, +% - \nextrow{<col name>}, % - \getnextrow{<col name>}{\macro} % % FIXME this documentation is incomplete. Please refer to pgfplotstable.pdf . @@ -1310,7 +1315,7 @@ % \pgfplotstablerow will expand to the current column index, column % name and row index, respectively. \def\pgfplotstabletypeset{% - \pgfutil@ifnextchar[{% + \pgfutil@ifnextchar[{% \pgfplotstabletypeset@opt }{% \pgfplotstabletypeset@opt[]% @@ -1361,7 +1366,7 @@ \fi \fi \ifpgfplotstabletypeset@includeoutfiles - \input \pgfplotstable@outfilename\relax + \input \pgfplotstable@outfilename\relax \else \pgfplotstableread{#2}\pgfplotstabletypesetfile@opt@@ \ifx\pgfplotstabletypesetfile@opt@@\relax @@ -1595,7 +1600,7 @@ % #2: style arguments % % All these styles are accumulated into the macro -% \pgfplots@each@nth@styles. +% \pgfplots@each@nth@styles. \def\pgfplotstabletypeset@append@every@nth@row#1#2{% \edef\pgfplots@loc@TMPa{#1}% % chech for the special 'each nth row={3[+1]}{...} format: @@ -1659,7 +1664,7 @@ % \pgfplots@error{There is no such table '\string#2' loaded into memory. Maybe you meant to use '\string\pgfplotstabletypesetfile{\string#2}' instead of '\string\pgfplotstabletypeset{\string#2}'?}% % \pgfplotslistnewempty#2 % }{}% - %-------------------------------------------------- + %-------------------------------------------------- \def\pgfplotstablename{#2}% the name of the actual table struct \def\pgfplotstablecolname{\pgfplotstable@colname}% \def\pgfplotstablecol{\the\c@pgfplotstable@colindex}% @@ -1746,7 +1751,7 @@ % % \ifpgfplotstable@sort - % make sure any columns exist (especially create on use). + % make sure any columns exist (especially create on use). % this can be done by calling getcolumnbyname once for every % column: \pgfplotslistforeachungrouped\pgfplotstable@colnames\as\pgfplotstable@colname{% @@ -1826,7 +1831,7 @@ % temporarily restore it: we may need it in row predicates: \global\advance\c@pgfplotstable@colindex by-1\relax \ifpgfplotstable@disable@rowcolstyles - % ok, then don't check for 'columns/<name>' and + % ok, then don't check for 'columns/<name>' and % 'display columns/<index>': \edef\pgfplotstable@loc@TMPa{\the\t@pgfplots@toka}% \else @@ -1858,7 +1863,7 @@ \expandafter\pgfplotslistpushbackglobal\pgfplotstable@coltype\to\pgfplotstabletypeset@final@coltypes % \pgfplotslistnewempty\pgfplotstable@col@processed - \c@pgfplotstable@counta=0 + \c@pgfplotstable@counta=0 \pgfplotslistforeachungrouped\pgfplotstable@col\as\pgfplotstable@entry{% \pgfplotstableuserowtrue \edef\pgfplotstable@loc@TMPa{\noexpand\pgfkeysvalueof{/pgfplots/table/row predicate/.@cmd}\the\c@pgfplotstable@rowindex}% @@ -2159,6 +2164,7 @@ \def\pgfplotstablecreatecol@opt[#1]#2#3{% \begingroup + \pgfkeysinterruptkeyfilter \def\pgfplotstablename{#3}% the name of the table struct \pgfplotstableset{columns=,#1,% /pgf/fpu/handlers/empty number/.code 2 args={% @@ -2294,6 +2300,7 @@ \pgfplotstable@isfirstrowfalse \advance\c@pgfplotstable@rowindex by1\relax \pgfutil@repeat + \endpgfkeysinterruptkeyfilter \global\let\pgfplots@glob@TMPc=\pgfplotstable@newcol \global\let\pgfplots@glob@TMPb=\pgfplotstable@newcolname \endgroup @@ -2310,7 +2317,7 @@ % %----------------------------------------------------------- -% create on use/cut/.style={create col/function graph cut y={7e-4}{x=Basis,ymode=log,xmode=log}{{table=regtable,y=special-L2}}}, +% create on use/cut/.style={create col/function graph cut y={7e-4}{x=Basis,ymode=log,xmode=log}{{table=regtable,y=special-L2}}}, % #1 = value of fixed line (I call it epsilon) % #2 = options % #3 = specification where to get the y from. It is a comma separated @@ -2350,7 +2357,7 @@ \ifx\pgfplotstable@fgc@foreach@\pgfutil@empty \else \edef\pgfplotstable@fgc@foreach@process@append{x={\pgfplotstable@fgc@x},y={\pgfplotstable@fgc@y}}% - % we have something like + % we have something like % foreach={\d in {1,2,3,4}}{table\d} % -> process it! % This will modify \pgfmathaccumb @@ -2400,8 +2407,8 @@ % % Interpolate: \pgfmathparse{ - \pgfplotstable@fgc@abscissafirst + - (\pgfplotstable@fgc@eps - \pgfplotstable@fgc@first) / (\pgfplotstable@fgc@second-\pgfplotstable@fgc@first) + \pgfplotstable@fgc@abscissafirst + + (\pgfplotstable@fgc@eps - \pgfplotstable@fgc@first) / (\pgfplotstable@fgc@second-\pgfplotstable@fgc@first) * (\pgfplotstable@fgc@abscissasecond - \pgfplotstable@fgc@abscissafirst) }% \if\pgfplotstable@fgc@xmode1 \pgfmathfloatexp@{\pgfmathresult}% @@ -2419,7 +2426,7 @@ \ifx\pgfplotstable@fgc@foreach\pgfutil@empty \pgfkeyslet{/pgfplots/table/create col/next content}\pgfmathresult% \else - % we have something like + % we have something like % foreach={\d in {1,2,3,4}}{table\d} % -> process it! % This will modify \pgfmathaccumb @@ -2517,13 +2524,13 @@ \fi \pgfmathfloatlessthan@{\pgfplotstable@fgc@val}{\pgfplotstable@fgc@eps}% \ifpgfmathfloatcomparison - \pgfplotstable@fgc@findintervalwitheps@updateresult 01 + \pgfplotstable@fgc@findintervalwitheps@updateresult 01% \else - \pgfplotstable@fgc@findintervalwitheps@updateresult 10 + \pgfplotstable@fgc@findintervalwitheps@updateresult 10% \fi \fi }% -} +}% % #1 : the value of \pgfplotstable@fgc@lastwasless for which the loop % shall break. @@ -2947,7 +2954,7 @@ % use a side effect: columns are integers, they are stored as % '\pgfp@tmp@<index>'. Thus, column names and array indices are % essentially the same! That simplifies the operation and explains - % why we transposed the table. + % why we transposed the table. % We simply interprete the transposed table as array. We don't % even need to copy anything. \pgfplotsarrayresize{\pgfp@tmp}{\pgfplotstable@numrows}% |