summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-func
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-12 21:54:21 +0000
committerKarl Berry <karl@freefriends.org>2017-03-12 21:54:21 +0000
commit07604bb1d61b7ba4d6d79bfd1f68c95e29a34741 (patch)
tree894d3b55135d1befbf37958f4c161e404728d2ed /Master/texmf-dist/tex/generic/pst-func
parente639dabce744b5b7fc1a73bbb2af500dbfc76a16 (diff)
pst-func (12mar17)
git-svn-id: svn://tug.org/texlive/trunk@43479 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-func')
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex85
1 files changed, 45 insertions, 40 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 7d42c7f194d..3c6d6b4200d 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -31,8 +31,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.83}
-\def\filedate{2017/03/07}
+\def\fileversion{0.84}
+\def\filedate{2017/03/11}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -549,9 +549,10 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\def\pst@tempA{#3}%
\ifx\pst@tempA\@empty\psBinomial@iii{#1}{#2}{#2}{#5}%
\else\psBinomial@iii{#1}{#2}{#3}{#5}\fi
- \fi}%
+ \fi}
+%
\def\psBinomial@iii#1#2#3#4{%
- \begin@OpenObj%
+ \begin@OpenObj
\addto@pscode{
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
@@ -590,22 +591,22 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
} for
\ifPst@markZeros\else k dx add scx 0 L \fi % last line down to x-axis
}%
-% \psk@fillstyle%
-% \pst@stroke%
- \end@OpenObj%
+% \psk@fillstyle
+% \pst@stroke
+ \end@OpenObj
}%
%
\def\psBinomialN{\pst@object{psBinomialN}}%
\def\psBinomialN@i#1#2{%
-\leavevmode
-\pst@killglue
-\begingroup
-\use@par
-\init@pscode
-\def\cplotstyle{curve}%
-\ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle}\fi
-\addto@pscode{%
-\ifx\psplotstyle\cplotstyle /Curve true def \else /Curve false def \fi
+ \leavevmode
+ \pst@killglue
+ \begingroup
+ \use@par
+ \init@pscode
+ \def\cplotstyle{curve}%
+ \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
/scy { \pst@number\psyunit mul } def
/N #1 def
@@ -644,14 +645,14 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
/xOld x def
} for
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
-\use@pscode
-\endgroup
-\ignorespaces%
+ }%
+ \ifx\psplotstyle\cplotstyle\@nameuse{endplot@\psplotstyle}\else
+ \psk@fillstyle
+ \pst@stroke
+ \fi
+ \use@pscode
+ \endgroup
+ \ignorespaces
}%
\def\psBinomialF{\pst@object{psBinomialF}}
\def\psBinomialF@i#1#2{\psBinomialF@ii#1,,,\@nil{#2}}%
@@ -665,7 +666,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\else\psBinomialF@iii{#1}{#2}{#3}{#5}\fi
\fi}%
\def\psBinomialF@iii#1#2#3#4{%
- \begin@OpenObj%
+ \begin@OpenObj
\addto@pscode{
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
@@ -677,6 +678,15 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
/q 1 p sub def
\ifPst@markZeros /kOld dx neg m add def \else
/kOld m def \fi
+ \psFunc@leftEnd 0 eq
+ { }
+ { kOld 0 eq
+ { kOld \psFunc@leftEnd sub scx 0 moveto % starting point
+ \ifPst@LineEnding
+ kOld \psFunc@radiusout\pst@number\psxunit div sub scx 0 L stroke
+ kOld scx 0 newpath \psFunc@radiusout 0 360 arc kOld scx 0 \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill \else
+ kOld scx 0 L stroke \fi }
+ { } ifelse } ifelse
kOld scx 0 moveto % starting point
0 1 m 1 sub {
/k exch def % save loop variable
@@ -684,27 +694,21 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
{ /Y q N exp def
/F Y def}
{ /Y Y N k sub 1 add mul k div p mul q div def
- /F F Y add def}
+ /F F Y add def }
ifelse
} for
m 1 n { % n-m+1 times
/k exch def % save loop variable
k 0 eq
{ /Y q N exp def
- /F Y def}
+ /F Y def }
{ /Y Y N k sub 1 add mul k div p mul q div def
- /F F Y add def}
+ /F F Y add def }
ifelse % recursive definition
\ifPst@markZeros kOld scx F scy L k dx add scx F scy L k dx add scx 0 L kOld 1 add scx 0 L
\else
- \ifPst@LineEnding
- k 0 eq
- { }
- { kOld scx F scy newpath \psFunc@radiusout 0 360 arc kOld scx F scy \psFunc@radiusinL 360 0 arcn closepath \pst@usecolor\psk@LineEndColorL fill } ifelse \fi
+ kOld scx F scy newpath \psFunc@radiusout 0 360 arc kOld scx F scy \psFunc@radiusinL 360 0 arcn closepath \pst@usecolor\psk@LineEndColorL fill
kOld \ifPst@LineEnding\psFunc@radiusout\pst@number\psxunit div add \fi
- k 0 eq
- { \psFunc@leftEnd sub }
- { } ifelse
scx F scy moveto
k 1 add
\ifPst@LineEnding\psFunc@radiusout\pst@number\psxunit div sub \fi
@@ -715,7 +719,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\ifPst@LineEnding
k N eq
{ }
- { k 1 add scx F scy newpath \psFunc@radiusout 0 360 arc k 1 add scx F scy \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill }
+ { k 1 add scx F scy newpath \psFunc@radiusout 0 360 arc k 1 add scx F scy \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill }
ifelse
\ifPst@VLines
Y \psFunc@radiusout\pst@number\psyunit div 2 mul le
@@ -753,7 +757,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\else\psBinomialFS@iii{#1}{#2}{#3}{#5}\fi
\fi}%
\def\psBinomialFS@iii#1#2#3#4{%
- \begin@OpenObj%
+ \begin@OpenObj
\addto@pscode{
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
@@ -830,7 +834,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
/kOld kOld 1 add def
} for
}%
- \end@OpenObj%
+ \end@OpenObj
}%
%
\def\psBinomialC{\pst@object{psBinomialC}}
@@ -858,7 +862,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
% /xEnd xOld neg dx add scx def
Curve
{ /Coors [xOld dx sub scx 0] def }% saves the coordinates for curve
- { xOld scx 0 moveto } % starting point
+ { xOld scx 0 moveto }% starting point
ifelse
0 1 N { % N times
/k exch def % save loop variable
@@ -891,7 +895,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\fi
\use@pscode
\endgroup
-\ignorespaces}
+\ignorespaces}%
%
%
\def\psPoisson{\pst@object{psPoisson}}% with contributions from Gerry Coombes
@@ -1649,3 +1653,4 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
%% END: pst-func.tex
\endinput
%
+