From fe38cd627c913aa673c7af4a119532d09b622d72 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 3 Mar 2008 01:11:37 +0000 Subject: pst-func update (2mar08) git-svn-id: svn://tug.org/texlive/trunk@6811 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-func/Changes | 2 + .../texmf-dist/tex/generic/pst-func/pst-func.tex | 136 +++++++++++---------- 2 files changed, 76 insertions(+), 62 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes index 16f14b6cfe7..79457f263ef 100644 --- a/Master/texmf-dist/doc/generic/pst-func/Changes +++ b/Master/texmf-dist/doc/generic/pst-func/Changes @@ -1,4 +1,6 @@ ..... pst-func.tex +0.52 2008-03-02 - changes macros from SpecialObj to OpenObj to allow + using inside \pscustom 0.51 2008-02-27 - enable filling support for \psIntegral and \psCumIntegral (suggested by Rafal Bartczuk) 0.50 2007-08-30 - modified \psPoisson{m,N}{Lambda} (Gerry Coombes) 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 d5f13909efa..28027667b8b 100644 --- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex +++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex @@ -28,8 +28,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} -\def\fileversion{0.51} -\def\filedate{2008/02/27} +\def\fileversion{0.52} +\def\filedate{2008/03/02} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -92,7 +92,7 @@ zeroLineColor=black}% % \def\psPolynomial{\pst@object{psPolynomial}} -\def\psPolynomial@i#1#2{{% +\def\psPolynomial@i#1#2{% \begin@OpenObj \@nameuse{beginplot@\psplotstyle}% \gdef\psplot@init{}% @@ -136,7 +136,7 @@ \psPolynomial@iii% \fi% \end@OpenObj -}\ignorespaces} +\ignorespaces} % \def\psPolynomial@ii{% \addto@pscode{% @@ -215,7 +215,7 @@ % \def\psGaussI{\pst@object{psGaussI}} \def\psGaussI@i#1#2{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /a #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -237,12 +237,12 @@ } repeat stroke }% - \end@SpecialObj% + \end@OpenObj% } % \def\psSi{\pst@object{psSi}} \def\psSi@i#1#2{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /x #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -255,11 +255,11 @@ } repeat stroke }% - \end@SpecialObj% + \end@OpenObj% } \def\pssi{\pst@object{pssi}} \def\pssi@i#1#2{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /x #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -272,12 +272,12 @@ } repeat stroke }% - \end@SpecialObj% + \end@OpenObj% } % \def\psCi{\pst@object{psCi}} \def\psCi@i#1#2{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /x #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -290,11 +290,11 @@ } repeat stroke }% - \end@SpecialObj% + \end@OpenObj% } \def\psci{\pst@object{psci}} \def\psci@i#1#2{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /x #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -307,7 +307,7 @@ } repeat stroke }% - \end@SpecialObj% + \end@OpenObj% } % \define@key[psset]{pst-func}{PSfont}{\def\psk@PSfont{/#1 }} @@ -317,12 +317,12 @@ % \def\psPrintValue{\pst@object{psPrintValue}} \def\psPrintValue@i#1{% - \begin@ClosedObj + \begin@SpecialObj \addto@pscode{ gsave \psk@PSfont findfont \psk@fontscale scalefont setfont #1 \psk@valuewidth string cvs 0 0 moveto show grestore }% - \end@ClosedObj% + \end@SpecialObj% } % % Integrals 2006-01-16 @@ -330,7 +330,7 @@ % \def\psCumIntegral{\pst@object{psCumIntegral}} \def\psCumIntegral@i#1#2#3{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /a #1 def /dx #2 #1 sub \psk@plotpoints\space div def @@ -347,14 +347,14 @@ } repeat % stroke }% - \psk@fillstyle% - \pst@stroke% - \end@SpecialObj% +% \psk@fillstyle% +% \pst@stroke% + \end@OpenObj% } % \def\psIntegral{\pst@object{psIntegral}} \def\psIntegral@i#1#2(#3,#4)#5{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /a #3 def /dx #4 #3 sub \psk@plotpoints\space div def @@ -377,9 +377,9 @@ } repeat % stroke }% - \psk@fillstyle% - \pst@stroke% - \end@SpecialObj% +% \psk@fillstyle% +% \pst@stroke% + \end@OpenObj% } % \def\psConv{\@ifnextchar[{\psConv@i}{\psConv@i[]}} @@ -403,7 +403,7 @@ \else\psBinomial@iii{#1}{#2}{#3}{#5}\fi \fi}% \def\psBinomial@iii#1#2#3#4{% - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /scx { \pst@number\psxunit mul } def /scy { \pst@number\psyunit mul } def @@ -441,16 +441,20 @@ } for \ifPst@markZeros\else k dx add scx 0 L \fi % last line down to x-axis }% - \psk@fillstyle% - \pst@stroke% - \end@SpecialObj% +% \psk@fillstyle% +% \pst@stroke% + \end@OpenObj% }% +% \def\psBinomialN{\pst@object{psBinomialN}} \def\psBinomialN@i#1#2{% + \leavevmode \pst@killglue - \begin@SpecialObj% + \begingroup + \use@par + \init@pscode \def\cplotstyle{curve}% - \ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle}\fi% + \ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle} \fi% \addto@pscode{ \ifx\psplotstyle\cplotstyle /Curve true def \else /Curve false def \fi /scx { \pst@number\psxunit mul } def @@ -489,13 +493,14 @@ \fi /xOld x def } for - Curve { [ xEnd 0 Coors aload pop} if % showpoints on top of the stack + Curve { [ xEnd 0 Coors aload pop } if % showpoints on top of the stack }% \ifx\psplotstyle\cplotstyle\@nameuse{endplot@\psplotstyle}\else% \psk@fillstyle% \pst@stroke% \fi% - \end@SpecialObj% + \use@pscode% + \endgroup% \ignorespaces% } % @@ -506,7 +511,7 @@ \ifx\pst@tempA\@empty\psPoisson@iii{0}{#1}{#4}\else \psPoisson@iii{#1}{#2}{#4}\fi}% \def\psPoisson@iii#1#2#3{% M N lambda - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /scx { \pst@number\psxunit mul } def /scy { \pst@number\psyunit mul } def @@ -538,9 +543,9 @@ } for \ifPst@markZeros\else k dx add scx 0 L \fi % last line down to x-axis }% - \psk@fillstyle - \pst@stroke - \end@SpecialObj% +% \psk@fillstyle +% \pst@stroke + \end@OpenObj% } % \define@key[psset]{pst-func}{alpha}{\pst@checknum{#1}\psk@alpha } % gamma @@ -552,12 +557,12 @@ \ifdim#1pt<\z@ \psframebox*{\color{red}!!!\#1 must be greater than 0!!!} \else \addbefore@par{plotpoints=500,alpha=0.5,beta=0.5}% - \begin@SpecialObj + \begin@OpenObj \psplot{#1}{#2}{ \psk@beta x mul \psk@alpha exp x div Euler \psk@beta neg x mul \psk@alpha GAMMALN sub exp mul} - \end@SpecialObj% - \ignorespaces% + \end@OpenObj% \fi% + \ignorespaces% } % \def\psBetaDist{\pst@object{psBetaDist}} @@ -565,34 +570,37 @@ \ifdim#1pt<\z@ \psframebox*{\color{red}!!!\#1 must be greater than 0!!!} \else \addbefore@par{plotpoints=200,alpha=1,beta=1}% - \begin@SpecialObj + \begin@OpenObj \psplot{#1}{#2}{ \psk@beta \psk@alpha add GAMMA \psk@beta GAMMA \psk@alpha GAMMA mul div 1 x sub \psk@beta 1.0 sub exp mul x \psk@alpha 1.0 sub exp mul } - \end@SpecialObj% - \ignorespaces% + \end@OpenObj% \fi% + \ignorespaces% } % \def\psChiIIDist{\pst@object{psChiIIDist}} \def\psChiIIDist@i#1#2{% \addbefore@par{plotpoints=500,nue=1}% - \begin@SpecialObj + \begin@OpenObj % \ifdim\psk@nue pt<\z@ \psframebox*{\color{red}!!!nue must be greater than 0!!!} % \else \psplot{#1}{#2}{% x 2 div \psk@nue 2 div exp x div Euler -0.5 x mul \psk@nue 2 div GAMMALN sub exp mul }% % \fi% - \end@SpecialObj% + \end@OpenObj% \ignorespaces% } % \def\psTDist{\pst@object{psTDist}} \def\psTDist@i#1#2{% + \leavevmode + \pst@killglue + \begingroup \addbefore@par{plotpoints=500}% - \begin@SpecialObj + \use@par \ifdim\psk@nue pt<\z@ \psframebox*{\color{red}!!!nue must be greater than 0!!!} \else \psplot{#1}{#2}{ @@ -601,7 +609,7 @@ Euler \psk@nue 1 add 2 div GAMMALN \psk@nue 2 div GAMMALN sub exp mul }% \fi% - \end@SpecialObj% + \endgroup% \ignorespaces% } % @@ -609,15 +617,18 @@ \def\psFDist@i#1#2{% \ifdim#1pt<\z@ \psframebox*{\color{red}!!!\#1 must be greater than 0!!!} \else + \leavevmode + \pst@killglue + \begingroup \addbefore@par{plotpoints=500,mue=1}% - \begin@SpecialObj + \use@par \psplot{#1}{#2}{ x \psk@mue mul \psk@nue div dup \psk@mue 2 div exp x div exch 1 add \psk@mue \psk@nue add 2 div exp div Euler \psk@mue \psk@nue add 2 div GAMMALN \psk@mue 2 div GAMMALN sub \psk@nue 2 div GAMMALN sub exp mul }% - \end@SpecialObj% + \endgroup% \fi% \ignorespaces% } @@ -630,16 +641,17 @@ % \def\psLame{\pst@object{psLame}} \def\psLame@i#1{% - \addbefore@par{plotpoints=200} + \leavevmode \pst@killglue - \begin@SpecialObj + \begingroup + \addbefore@par{plotpoints=200}% + \use@par \parametricplot{0}{360}{% t cos dup mul 1 #1\space div exp \pst@radiusA \pst@number\psxunit div mul t 90 gt { t 270 lt { neg } if } if t sin dup mul 1 #1\space div exp \pst@radiusB \pst@number\psyunit div mul t 180 gt { neg } if } - \end@SpecialObj -} + \endgroup\ignorespaces} % % For polar plots %\define@boolkey[psset]{pst-func}[PstAdd@]{polarplot}[true]{} @@ -648,9 +660,7 @@ % \def\psplotImp{\pst@object{psplotImp}}% 20060420 \def\psplotImp@i(#1,#2)(#3,#4)#5{% - \pst@killglue - \begingroup - \begin@SpecialObj% + \begin@OpenObj% \addto@pscode{ /xMin #1 def /xMax #3 def @@ -697,14 +707,15 @@ } for } for }% - \end@SpecialObj% - \endgroup - \ignorespaces + \end@OpenObj% } % \def\psVolume{\pst@object{psVolume}}% 2007-06-23 -\def\psVolume@i(#1,#2)#3#4{{% - \begin@SpecialObj +\def\psVolume@i(#1,#2)#3#4{% + \leavevmode + \pst@killglue + \begingroup + \use@par \psplot[fillstyle=none]{#1}{#2}{#4}% original function \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis \multido{\iA=1+1}{#3}{% run it #3 times with increment \A @@ -728,8 +739,9 @@ plotpoints=40,dotstyle=*,dotsize=0.5pt} \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg} % draw again the curves to get the borderline - \end@SpecialObj -}\ignorespaces} + \endgroup% + \ignorespaces% +} % % -- cgit v1.2.3