diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-23 22:40:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-23 22:40:09 +0000 |
commit | 0c7d6abf80d6c8ae90936dfed87abd179341bdc4 (patch) | |
tree | 2d94913dda072d51de967d75c9bb4bcbe9842540 /Master/texmf-dist/tex | |
parent | 59c2fb860cfc7f447fded1f644421e4ee9bff956 (diff) |
pst-func 0.72 (23apr11)
git-svn-id: svn://tug.org/texlive/trunk@22177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-func/pst-func.tex | 84 |
1 files changed, 46 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex index 9596aa42367..8f88d13e308 100644 --- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex +++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex @@ -1,4 +1,4 @@ -%% $Id: pst-func.tex 411 2010-11-03 07:58:25Z herbert $ +%% $Id: pst-func.tex 488 2011-04-23 09:19:40Z herbert $ %% %% This is file `pst-func.tex', %% @@ -30,8 +30,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.71} -\def\filedate{2010/11/03} +\def\fileversion{0.72} +\def\filedate{2011/04/23} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -341,14 +341,10 @@ Func \else #1 \fi \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if - \psk@valuewidth string cvs /Output exch def % save output - \ifPst@comma % do we have to change dot to comma - 0 1 Output length 1 sub { - /Index exch def - Output Index get 46 eq { Output Index 44 put } if - } for - \fi - \psk@xShift\space 0 moveto Output show grestore + \psk@valuewidth string cvs %/Output exch def % save output + \ifPst@comma dot2comma \fi % do we have to change dot to comma + \psk@xShift\space 0 moveto %Output + show grestore }% \end@SpecialObj% } @@ -378,13 +374,9 @@ \ifPst@round round \else cvi \fi exch div } if \psk@decimals 0 eq { cvi } if /numb ED expon \psk@valuewidth string cvs /expon exch def - numb \psk@valuewidth string cvs /Output exch def - \ifPst@comma % do we have to change dot to comma - 0 1 Output length 1 sub { - /Index exch def - Output Index get 46 eq { Output Index 44 put } if - } for - \fi + numb \psk@valuewidth string cvs + \ifPst@comma dot2comma \fi % do we have to change dot to comma + /Output exch def /txspc \psk@fontscale 4 div def \psk@xShift\space 0 moveto mfont Output show txspc 0 rmoveto s1 (\string\264) show @@ -394,14 +386,10 @@ \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul \ifPst@round round \else cvi \fi exch div } if \psk@decimals 0 eq { cvi } if %inserted to handle decimals=0 - \psk@valuewidth string cvs /Output ED - \ifPst@comma % do we have to change dot to comma - 0 1 Output length 1 sub { - /Index exch def - Output Index get 46 eq { Output Index 44 put } if - } for - \fi - \psk@xShift\space 0 moveto mfont Output show + \psk@valuewidth string cvs + \ifPst@comma dot2comma \fi % do we have to change dot to comma + \psk@xShift\space 0 moveto mfont %Output + show } ifelse }% \end@SpecialObj% @@ -514,7 +502,8 @@ \ifPst@markZeros k dx add scx 0 L kOld 1 add scx 0 L \fi \ifPst@printValue gsave \psk@PSfont findfont \psk@fontscale scalefont setfont - Y \psk@valuewidth string cvs + Y \psk@valuewidth string cvs + \ifPst@comma dot2comma \fi k scx \psk@fontscale 2 div add Y scy \pst@number\pslabelsep add moveto 90 rotate show grestore @@ -568,7 +557,8 @@ } ifelse \ifPst@printValue gsave \psk@PSfont findfont \psk@fontscale scalefont setfont - y \psk@valuewidth string cvs + y \psk@valuewidth string cvs %/Output exch def + \ifPst@comma dot2comma \fi % do we have to change dot to comma x dx sub scx \psk@fontscale 2 div add y scy \pst@number\pslabelsep add moveto 90 rotate show grestore @@ -616,7 +606,8 @@ \ifPst@markZeros k dx add scx 0 L \fi \ifPst@printValue gsave \psk@PSfont findfont \psk@fontscale scalefont setfont - Y \psk@valuewidth string cvs + Y \psk@valuewidth string cvs %/Output exch def + \ifPst@comma dot2comma \fi % do we have to change dot to comma k scx \psk@fontscale 2 div add Y scy \pst@number\pslabelsep add moveto 90 rotate show grestore @@ -765,7 +756,7 @@ 1 Euler x \psk@beta div \psk@alpha exp neg exp % e^(-(x/beta)^alpha)) sub - } + }% \end@OpenObj% \ignorespaces% } @@ -795,7 +786,7 @@ 1 sub /m ED 2 div cvi /n ED ] dup /xyValues ED mark exch % [ [x y x y ...] - aload pop % [ x y x y x y ... ] + aload pop % [ x y x y x y ... ] n { exch div m 1 roll /m m 2 sub def } repeat n array astore /yxdiv ED % xyValues == % [0.5 0.025 0.4 0.475 0.09 0.27 0.01 0.23] @@ -825,13 +816,9 @@ 2 mul 1 sub neg gsave \psk@PSfont findfont \psk@fontscale scalefont setfont \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul cvi exch div } if - \psk@valuewidth string cvs /Output exch def % save output - \ifPst@comma % do we have to change dot to comma - 0 1 Output length 1 sub { - /Index exch def - Output Index get 46 eq { Output Index 44 put } if - } for - \fi + \psk@valuewidth string cvs %/Output exch def % save output + \ifPst@comma dot2comma \fi % do we have to change dot to comma + /Output ED \psk@xShift\space -30 moveto (Gini: ) show Output show grestore \fi @@ -862,6 +849,11 @@ %\define@boolkey[psset]{pst-func}[PstAdd@]{polarplot}[true]{} %\psset[pst-func]{polarplot=false} % +%\define@boolkey[psset]{pstricks-add}[Pst@]{GetFinalState}[true]{} +%\define@key[psset]{pstricks-add}{filename}{\def\psk@filename{#1}}% +%\define@boolkey[psset]{pstricks-add}[Pst@]{saveData}[true]{} % \ifPst@saveData +%\psset[pstricks-add]{GetFinalState=false,saveData=false,filename=PSTdata} +% \define@key[psset]{pst-func}{stepFactor}[0.67]{\pst@checknum{#1}\psk@stepFactor } \psset[pst-func]{stepFactor=0.67} % @@ -869,8 +861,10 @@ \def\psplotImp@i(#1,#2)(#3,#4){% \@ifnextchar[{\psplotImp@ii(#1,#2)(#3,#4)}{\psplotImp@ii(#1,#2)(#3,#4)[]}} \def\psplotImp@ii(#1,#2)(#3,#4)[#5]#6{% + \addbefore@par{filename=\jobname.data}% \begin@OpenObj% \addto@pscode{ + \ifPst@saveData /Pst@data (\psk@filename) (w) file def \fi /xMin #1 def /xMax #3 def /yMin #2 def @@ -892,20 +886,32 @@ /setpixel { dy div exch dx div exch + \ifPst@saveData + 2 copy + \pst@number\psyunit div exch \pst@number\psxunit div + 20 string cvs Pst@data exch writestring + Pst@data (\space) writestring + 20 string cvs Pst@data exch writestring +% Pst@data (\string\]) writestring + Pst@data (\string\n) writestring + \fi \pst@number\pslinewidth 2 div 0 360 arc fill } bind def % /VZ true def % suppose that F(x,y)>=0 /x xMin def /y yMin def Func 0.0 lt { /VZ false def } if % erster Wert xMin dx \psk@stepFactor\space mul xMax { /x exch def + \ifPst@saveData Pst@data ([\string\n) writestring \fi yMin dy \psk@stepFactor\space mul yMax { /y exch def Func 0 lt { VZ { x y setpixel /VZ false def} if } { VZ {}{ x y setpixel /VZ true def } ifelse } ifelse } for + \ifPst@saveData Pst@data (]\string\n) writestring \fi } for % +\iffalse /x xMin def /y yMin def Func 0.0 lt { /VZ false def } if % erster Wert yMin dy \psk@stepFactor\space mul yMax { /y exch def @@ -916,6 +922,8 @@ { VZ {}{ x y setpixel /VZ true def } ifelse } ifelse } for } for +\fi + \ifPst@saveData Pst@data closefile \fi }% \end@OpenObj% } |