diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex | 320 |
1 files changed, 285 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex index 60df282f8bb..2dacf8f7458 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/util/pgfplotsutil.code.tex @@ -161,6 +161,7 @@ \expandafter\def\expandafter\pgfplots@command@to@string@@\pgfplots@glob@TMPa#1\pgfplots@EOI#2{% \def#2{#1}% }% +\def\pgfplotscommandtostring#1#2{\pgfplots@command@to@string{#1}{#2}}% % As \pgfplots@command@to@string, but it works for commands accepting % arguments. More precisely, #2 will be a string (!) of the form @@ -205,7 +206,9 @@ % \pgfplotsutil@ifdefinedui{\csname abc\endcsname} -> no % \pgfplotsutil@ifdefinedui{a_file_name} -> no \def\pgfplotsutil@ifdefinedui#1#2#3{% - \def\pgfplotsutil@@arg@ifdefined{#1}% + {\toks0={#1}% this construction is necessary to handle '#' characters in '#1' + \xdef\pgfplotsutil@@arg@ifdefined{\the\toks0}% + }% \pgfplots@command@to@string\pgfplotsutil@@arg@ifdefined\pgfplotsutil@@arg@ifdefined \expandafter\pgfplotsutil@trim\expandafter{\pgfplotsutil@@arg@ifdefined}% \pgfutil@ifundefined{\pgfplotsretval}{#3}{#2}% @@ -214,7 +217,9 @@ % '#1' after '#1' has been normalized. % It invokes '#3' if '#1#2' is defined and '#4' if not. \def\pgfplotsutil@ifdefinedui@withsuffix#1#2#3#4{% - \def\pgfplotsutil@@arg@ifdefined{#1}% + {\toks0={#1}% + \xdef\pgfplotsutil@@arg@ifdefined{\the\toks0}% + }% \pgfplots@command@to@string\pgfplotsutil@@arg@ifdefined\pgfplotsutil@@arg@ifdefined \expandafter\pgfplotsutil@trim\expandafter{\pgfplotsutil@@arg@ifdefined}% \pgfutil@ifundefined{\pgfplotsretval #2}{#4}{#3}% @@ -304,7 +309,7 @@ \edef\pgfmathresult{#2}% \fi }% -\def\pgfplotsmathlessthan#1#2{\ifdim#1 pt<#2 pt \pgfmathfloatcomparisontrue\else\pgfmathfloatcomparisonfalse\fi} +\def\pgfplotsmathlessthan#1#2{\ifdim#1pt<#2pt \pgfmathfloatcomparisontrue\else\pgfmathfloatcomparisonfalse\fi} % Re-define two-argument function for min and max. % The pgfmath engine now uses a variable number of arguments. @@ -555,6 +560,7 @@ % Discards any token up to (and including) \relax. \def\pgfplots@gobble@until@relax#1\relax{}% +\def\pgfplots@gobble@until@EOI#1\pgfplots@EOI{}% % A (simple) replacement for \foreach which % 1. does NOT scope the argument @@ -573,13 +579,24 @@ % scopes. % % This loop *can* be nested. -\def\pgfplotsforeachungrouped#1{\pgfplotsforeachungrouped@{#1}}% -\long\def\pgfplotsforeachungrouped@#1in #2#3{% - \pgfplotsforeachungrouped@isuniform{#2}% - \ifpgfplots@loc@tmp - \pgfplotsforeachungroupeduniform@{#1}#2\relax{#3}% +\def\pgfplotsforeachungrouped#1{% + \pgfutil@ifnextchar/{\pgfplotsforeachungrouped@{#1}}{\pgfplotsforeachungrouped@{#1}/{}}% +}% +\long\def\pgfplotsforeachungrouped@#1/#2in #3#4{% + \def\pgfplots@foreach@loc@TMPa{#2}% + \ifx\pgfplots@foreach@loc@TMPa\pgfutil@empty + \pgfplotsforeachungrouped@isuniform{#3}% + \ifpgfplots@loc@tmp + % special handling: + % \foreach #1 in {a,b,...,c} can be improved: + \pgfplotsforeachungroupeduniform@{#1}#3\relax{#4}% + \else + % invoke \foreach #1 in {#3} and transport results: + \pgfplotsforeachungroupednonuniform@#1{#3}{#4}% + \fi \else - \pgfplotsforeachungroupednonuniform@#1{#2}{#3}% + % invoke \foreach #1/#2 in {#3} and transport results: + \pgfplotsforeachungroupedslashed@#1/#2{#3}{#4}% \fi } \let\pgfplots@original@pgfmathadd@=\pgfmathadd@ @@ -659,6 +676,25 @@ #3% }% } +\long\def\pgfplotsforeachungroupedslashed@#1/#2#3#4{% + \pgfplotsapplistXXglobalnewempty + \foreach\pgfplots@foreach@loc@TMPa/\pgfplots@foreach@loc@TMPb in {#3} {% + \edef\pgfplots@foreach@loc@TMPa{\pgfplots@foreach@loc@TMPa/\pgfplots@foreach@loc@TMPb}% + \expandafter\pgfplotsapplistXXglobalpushback\expandafter{\pgfplots@foreach@loc@TMPa,}% + }% + \pgfplotsapplistXXgloballet\pgfplots@foreach@loc@TMPa + \pgfplotsapplistXXglobalclear + \expandafter\pgfplotsforeachentryinCSVisterminated\expandafter\pgfplots@foreach@loc@TMPa\expandafter{\pgfplots@foreach@loc@TMPa}{% + \expandafter\pgfplotsforeachungroupedslashed@@\pgfplots@foreach@loc@TMPa\pgfplots@EOI + \let#1=\pgfplots@foreach@loc@TMPa + \let#2=\pgfplots@foreach@loc@TMPb + #4% + }% +} +\def\pgfplotsforeachungroupedslashed@@#1/#2\pgfplots@EOI{% + \def\pgfplots@foreach@loc@TMPa{#1}% + \def\pgfplots@foreach@loc@TMPb{#2}% +}% % Sets \ifpgfplots@loc@tmp to true if and only if '#1' is of the form % #1 = <number1>,<number2>,...,<number3>. @@ -741,6 +777,12 @@ % Both, #1 and #2 will be provided as floating point numbers unless % configured otherwise with \pgfplotsforeachlogarithmicsetoutput, % see above. +% +% Arithmethics will be carried out with the math class +% '\pgfplotsforeachlogarithmicmathid'. +% This macro should expand to something which is usable inside of +% \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{....} +% the default is 'float' % % FIXME : THIS CAN'T BE NESTED YET! \def\pgfplotsforeachlogarithmicungrouped[#1]#2/#3{\pgfplotsforeachlogarithmicungrouped@[#1]{#2}{#3}}% @@ -749,18 +791,18 @@ % \pgfplots@foreach@loc@TMPd = N in fixed point % \pgfplots@foreach@loc@TMPc = N-1 in float : \edef\pgfplots@plot@samples@@{#1}% - \pgfmathfloatcreate{1}{1.0}{0}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{one}% \let\pgfplots@foreach@loc@TMPa=\pgfmathresult - \pgfmathfloatparsenumber{\pgfplots@plot@samples@@}% - \expandafter\pgfmathfloatsubtract@\expandafter{\pgfmathresult}{\pgfplots@foreach@loc@TMPa}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{parsenumber}{\pgfplots@plot@samples@@}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{subtract}{{\pgfmathresult}{\pgfplots@foreach@loc@TMPa}}% \let\pgfplots@foreach@loc@TMPc=\pgfmathresult % \edef\pgfplots@loc@TMPb{#4}% \expandafter\pgfplotsforeachlogarithmicungrouped@readdomain\pgfplots@loc@TMPb\relax % compute mesh width into \pgfplots@foreach@loc@TMPc: % \pgfplots@foreach@loc@TMPc := h := ( log(xmax) - log(xmin) ) / (N-1) - \pgfmathfloatsubtract@{\pgfplots@foreach@loc@TMPb}{\pgfplots@foreach@loc@TMPa}% - \pgfmathfloatdivide@{\pgfmathresult}{\pgfplots@foreach@loc@TMPc}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{subtract}{{\pgfplots@foreach@loc@TMPb}{\pgfplots@foreach@loc@TMPa}}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{divide}{{\pgfmathresult}{\pgfplots@foreach@loc@TMPc}}% \let\pgfplots@foreach@loc@TMPc=\pgfmathresult % % apply local scoping here: @@ -772,13 +814,14 @@ \pgfutil@loop \ifnum\c@pgf@counta<\pgfplots@plot@samples@@ % compute exp(log(min) + i * h) - \expandafter\pgfmathfloatparsenumber\expandafter{\the\c@pgf@counta}% - \expandafter\pgfmathfloatmultiply@\expandafter{\pgfmathresult}{\pgfplots@foreach@loc@TMPc}% - \expandafter\pgfmathfloatadd@\expandafter{\pgfmathresult}{\pgfplots@foreach@loc@TMPa}% + \edef\pgfplots@loc@TMPa{\the\c@pgf@counta}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{parsenumber}{\pgfplots@loc@TMPa}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{multiply}{{\pgfmathresult}{\pgfplots@foreach@loc@TMPc}}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{op}{add}{{\pgfmathresult}{\pgfplots@foreach@loc@TMPa}}% \let\pgfplots@loc@TMPa=\pgfmathresult \pgfplotsforeachlogarithmicungrouped@finalizeresult% \let#3=\pgfmathresult - \pgfmathfloatexp@{\pgfplots@loc@TMPa}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{exp}{\pgfplots@loc@TMPa}% \pgfplotsforeachlogarithmicungrouped@finalizeresult% \let#2=\pgfmathresult % @@ -798,16 +841,16 @@ \def\pgfplotsforeachlogarithmicungrouped@finalizeresult{}% +\def\pgfplotsforeachlogarithmicmathid{float} + % defines % \pgfplots@foreach@loc@TMPa := log(firstintervalpt) % and % \pgfplots@foreach@loc@TMPb := log(secondintervalpt) \def\pgfplotsforeachlogarithmicungrouped@readdomain#1:#2\relax{% - \pgfmathfloatparsenumber{#1}% - \pgfmathfloatln@{\pgfmathresult}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{log}{#1}% \let\pgfplots@foreach@loc@TMPa=\pgfmathresult - \pgfmathfloatparsenumber{#2}% - \pgfmathfloatln@{\pgfmathresult}% + \pgfplotscoordmath{\pgfplotsforeachlogarithmicmathid}{log}{#2}% \let\pgfplots@foreach@loc@TMPb=\pgfmathresult } @@ -820,7 +863,7 @@ \def\pgfplots@logfileopen#1{% \immediate\write-1{PGFPlots: reading {#1}}% \pgfutil@ifundefined{tikzifexternalizingcurrent}{% - % version not up-to-date!? + % version not up-to-date or external lib not loaded? }{% % adjust the .dep file only if we are externalizing. % Otherwise, it may be overwritten by \pgfplotstableread @@ -851,15 +894,23 @@ \begingroup \c@pgf@counta=#2\relax \c@pgf@countb=#1\relax - \c@pgf@countc=\c@pgf@countb - \ifnum\c@pgf@counta=0 - \pgfplots@error{Can't compute \the\c@pgf@countb\space mod \the\c@pgf@counta\space -- this yields division by zero (second argument is zero)!}% - \edef\pgfmathresult{#1}% + \ifnum\c@pgf@counta=2 + \ifodd\c@pgf@countb + \def\pgfmathresult{1}% + \else + \def\pgfmathresult{0}% + \fi \else - \divide\c@pgf@countc by\c@pgf@counta - \multiply\c@pgf@countc by\c@pgf@counta - \advance\c@pgf@countb by-\c@pgf@countc - \edef\pgfmathresult{\the\c@pgf@countb}% + \c@pgf@countc=\c@pgf@countb + \ifnum\c@pgf@counta=0 + \pgfplots@error{Can't compute \the\c@pgf@countb\space mod \the\c@pgf@counta\space -- this yields division by zero (second argument is zero)!}% + \edef\pgfmathresult{#1}% + \else + \divide\c@pgf@countc by\c@pgf@counta + \multiply\c@pgf@countc by\c@pgf@counta + \advance\c@pgf@countb by-\c@pgf@countc + \edef\pgfmathresult{\the\c@pgf@countb}% + \fi \fi \pgfmath@smuggleone\pgfmathresult \endgroup @@ -967,6 +1018,81 @@ \def\pgfplots@strcmp@rest{#2}% }% +% Takes two dimensional cartesian coordinates #1,#2 and +% defines the macros #3 and #4 to contain the associated polar +% coordinates. +% +% #1: x +% #2: y +% #3: a macro which will be filled with the angle (in degrees) +% #4: a macro which will be filled with the radius +\def\pgfplotsmathcarttopol#1#2#3#4{% + \pgfplotsmathcarttopol@{#1}{#2}{#3}{#4}{default}% +}% +\def\pgfplotsmathcarttopolbasic#1#2#3#4{% + \pgfplotsmathcarttopol@{#1}{#2}{#3}{#4}{pgfbasic}% +}% +% #5: the math engine to use (\pgfplotscoordmath argument) +\def\pgfplotsmathcarttopol@#1#2#3#4#5{% + \begingroup + \pgfplotscoordmath{#5}{parsenumber}{#1}% + \let\pgfplots@x=\pgfmathresult + \pgfplotscoordmath{#5}{parsenumber}{#2}% + \let\pgfplots@y=\pgfmathresult + \pgfplotscoordmath{#5}{op}{veclen}{{\pgfplots@x}{\pgfplots@y}}% + \let\pgfplots@r=\pgfmathresult + \pgfplotscoordmath{#5}{if is}{\pgfplots@r}{0}{% + \pgfplotscoordmath{#5}{parsenumber}{0}% + }{% + \pgfplotscoordmath{#5}{op}{divide}{{\pgfplots@x}{\pgfplots@r}}% + \let\pgfplots@quot=\pgfmathresult + \pgfplotscoordmath{#5}{op}{acos}{{\pgfplots@quot}}% + % + \pgfplotscoordmath{#5}{if is}{\pgfplots@y}{-}{% + \let\pgfplots@acos=\pgfmathresult + \pgfplotscoordmath{#5}{parsenumber}{-1}% + \pgfplotscoordmath{#5}{op}{multiply}{{\pgfmathresult}{\pgfplots@acos}}% + }{}% + }% + \let\pgfplots@deg=\pgfmathresult + \xdef\pgfplots@glob@TMPa{\noexpand\def\noexpand#3{\pgfplots@deg}\noexpand\def\noexpand#4{\pgfplots@r}}% + \endgroup + \pgfplots@glob@TMPa +}% + +% Takes two dimensional polar coordinates #1,#2 and +% defines the macros #3 and #4 to contain the associated cartesian +% coordinates. +% +% #1: angle (in degrees) +% #2: radius +% #3: a macro which will be filled with the x value +% #4: a macro which will be filled with the y value +\def\pgfplotsmathpoltocart#1#2#3#4{% + \pgfplotsmathpoltocart@{#1}{#2}{#3}{#4}{default}% +}% +\def\pgfplotsmathpoltocartbasic#1#2#3#4{% + \pgfplotsmathpoltocart@{#1}{#2}{#3}{#4}{pgfbasic}% +}% +% #5: the math engine to use (\pgfplotscoordmath argument) +\def\pgfplotsmathpoltocart@#1#2#3#4#5{% + \begingroup + \pgfplotscoordmath{#5}{parsenumber}{#1}% + \let\pgfplots@deg=\pgfmathresult + \pgfplotscoordmath{#5}{parsenumber}{#2}% + \let\pgfplots@r=\pgfmathresult + \pgfplotscoordmath{#5}{op}{sin}{{\pgfplots@deg}}% + \pgfplotscoordmath{#5}{op}{multiply}{{\pgfplots@r}{\pgfmathresult}}% + \let\pgfplots@y=\pgfmathresult + \pgfplotscoordmath{#5}{op}{cos}{{\pgfplots@deg}}% + \pgfplotscoordmath{#5}{op}{multiply}{{\pgfplots@r}{\pgfmathresult}}% + \let\pgfplots@x=\pgfmathresult + \xdef\pgfplots@glob@TMPa{\noexpand\def\noexpand#3{\pgfplots@x}\noexpand\def\noexpand#4{\pgfplots@y}}% + \endgroup + \pgfplots@glob@TMPa +}% + + \pgfutil@ifundefined{pgfmathdeclarefunction}{% % BACKWARDS COMPATIBILITY: We have PGF 2.00 : @@ -1184,17 +1310,17 @@ % #4: code to invoke in case arg1>=arg2 % the iflessthan method will be invoked within local scopes. /pgfplots/fixed </.style={% - /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifdim##1pt<##2pt\relax##3\else##4\fi},% + /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifdim##1pt<##2pt\relax##3\else ##4\fi},% }, /pgfplots/fixed <, /pgfplots/fixed >/.style={% - /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifdim##1pt>##2pt\relax##3\else##4\fi},% + /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifdim##1pt>##2pt\relax##3\else ##4\fi},% }, /pgfplots/int </.style={% - /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifnum##1<##2\relax##3\else##4\fi},% + /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifnum##1<##2\relax##3\else ##4\fi},% }, /pgfplots/int >/.style={% - /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifnum##1>##2\relax##3\else##4\fi},% + /pgfplots/iflessthan/.code args={##1##2##3##4}{\ifnum##1>##2\relax##3\else ##4\fi},% }, /pgfplots/float </.style={% /pgfplots/iflessthan/.code args={##1##2##3##4}{% @@ -1303,12 +1429,136 @@ \let\pgfplots@auxwrite=\pgfplots@auxwrite@latex }% +% sorts three elements. +% +% #1,#2,#3 are three macros containing the input. +% On output, these macros are redefined to represent the sorted range. +% The values of these macros must be a <dimen>, followed by anything +% else (but no \relax please) +% +% Example: +% \def\A{10pt furthervalues} +% \def\B{4pt value of b} +% \def\C{1pt value of c} +% \pgfplotsutilsortthree\A\B\C +% -> +% \A={1pt value of c} +% \B={4pt value of b} +% \C={10pt furthervalues} +% +% It uses insertion sort. +\def\pgfplotsutilsortthree#1#2#3{% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#1\relax + \afterassignment\pgfplots@gobble@until@relax \pgf@xb=#2\relax + \ifdim\pgf@xa>\pgf@xb + \let\pgfplots@loc@TMPa=#2% + \let#2=#1% + \let#1=\pgfplots@loc@TMPa% + \fi + % first two are sorted. + % + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#2\relax + \afterassignment\pgfplots@gobble@until@relax \pgf@xb=#3\relax + \let\pgfplots@loc@TMPa=#3% + \ifdim\pgf@xa>\pgf@xb + \let#3=#2% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#1\relax + \ifdim\pgf@xa>\pgf@xb + \let#2=#1% + \let#1=\pgfplots@loc@TMPa% + \else + \let#2=\pgfplots@loc@TMPa% + \fi + \fi + % ok. +}% + +% Like \pgfplotsutilsortthree, but for four elements (of the same +% form, see \pgfplotsutilsortthree). +% +% It uses insertion sort. +\def\pgfplotsutilsortfour#1#2#3#4{% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#1\relax + \afterassignment\pgfplots@gobble@until@relax \pgf@xb=#2\relax + \ifdim\pgf@xa>\pgf@xb + \let\pgfplots@loc@TMPa=#2% + \let#2=#1% + \let#1=\pgfplots@loc@TMPa% + \fi + % first two are sorted. + % + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#2\relax + \afterassignment\pgfplots@gobble@until@relax \pgf@xb=#3\relax + \let\pgfplots@loc@TMPa=#3% + \ifdim\pgf@xa>\pgf@xb + \let#3=#2% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#1\relax + \ifdim\pgf@xa>\pgf@xb + \let#2=#1% + \let#1=\pgfplots@loc@TMPa% + \else + \let#2=\pgfplots@loc@TMPa% + \fi + \fi + % ok, first three are sorted. + % + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#3\relax + \afterassignment\pgfplots@gobble@until@relax \pgf@xb=#4\relax + \let\pgfplots@loc@TMPa=#4% + \ifdim\pgf@xa>\pgf@xb + \let#4=#3% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#2\relax + \ifdim\pgf@xa>\pgf@xb + \let#3=#2% + \afterassignment\pgfplots@gobble@until@relax \pgf@xa=#1\relax + \ifdim\pgf@xa>\pgf@xb + \let#2=#1% + \let#1=\pgfplots@loc@TMPa% + \else + \let#2=\pgfplots@loc@TMPa% + \fi + \else + \let#3=\pgfplots@loc@TMPa% + \fi + \fi + % ok, first four are sorted. +}% + +% A variant of \pgfutil@ifnextchar which allows the '#' character +% inside of either '#2' or '#3'. +% +% It is slightly more expensive and relies on \t@pgfplots@tokc +\long\def\pgfplotsutil@ifnextchar#1#2#3{% + \let\pgfplotsutil@reserved@d=#1% + \t@pgfplots@tokc={#2}% + \edef\pgfplotsutil@reserved@a{\the\t@pgfplots@tokc}% + \t@pgfplots@tokc={#3}% + \def\pgfplotsutil@reserved@b{\the\t@pgfplots@tokc}% + \futurelet\pgfplotsutil@let@token\pgfplotsutil@ifnch} +\def\pgfplotsutil@ifnch{% + \ifx\pgfplotsutil@let@token\pgfplotsutil@sptoken + \let\pgfplotsutil@reserved@c\pgfplotsutil@xifnch + \else + \ifx\pgfplotsutil@let@token\pgfplotsutil@reserved@d + \let\pgfplotsutil@reserved@c\pgfplotsutil@reserved@a + \else + \let\pgfplotsutil@reserved@c\pgfplotsutil@reserved@b + \fi + \fi + \pgfplotsutil@reserved@c} +{% + \def\:{\global\let\pgfplotsutil@sptoken= } \: + \def\:{\pgfplotsutil@xifnch} \expandafter\gdef\: {\futurelet\pgfplotsutil@let@token\pgfplotsutil@ifnch} +} + \input pgfplotsliststructure.code.tex \input pgfplotsliststructureext.code.tex \input pgfplotsarray.code.tex +\input pgfplotsmatrix.code.tex \input pgfplotstableshared.code.tex \input pgfplotsdeque.code.tex \input pgfplotsbinary.code.tex +\input pgfplotsutil.verb.code.tex \usepgfplotslibrary{surfshading} |