summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-func
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-03-18 23:41:54 +0000
committerKarl Berry <karl@freefriends.org>2007-03-18 23:41:54 +0000
commit0201728be568157e7cd5c49141ab78608354494f (patch)
treeed97e0ee46db16544d939cd5bf40de98994edcd8 /Master/texmf-dist/tex/generic/pst-func
parentd8fc29c8d1712d80b8013ad32a302cf2f9748cdf (diff)
pst-func 0.48 (18mar07)
git-svn-id: svn://tug.org/texlive/trunk@4049 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.tex44
1 files changed, 40 insertions, 4 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 b1a4b5c99f1..ce583f7fc77 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.46}
-\def\filedate{2006/09/06}
+\def\fileversion{0.48}
+\def\filedate{2006/11/20}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -404,7 +404,7 @@
{ /Y q N exp def }
{ /Y Y N k sub 1 add mul k div p mul q div def }
ifelse % recursive definition
- kOld scx 0 L kOld scx Y scy L k dx add scx Y scy L
+ kOld scx 0 L kOld scx Y scy L k dx add scx Y scy L
\ifPst@markZeros k dx add scx 0 L \fi
\ifPst@printValue
gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
@@ -415,6 +415,7 @@
\fi
/kOld kOld 1 add def
} for
+ \ifPst@markZeros\else k dx add scx 0 L \fi % last line down to x-axis
}%
\psk@fillstyle
\pst@stroke
@@ -467,7 +468,7 @@
} for
Curve { [ xEnd 0 Coors aload pop} if % showpoints on top of the stack
}%
- \ifx\psplotstyle\cplotstyle \@nameuse{endplot@\psplotstyle} \else%
+ \ifx\psplotstyle\cplotstyle\@nameuse{endplot@\psplotstyle}\else%
\psk@fillstyle%
\pst@stroke%
\fi%
@@ -475,6 +476,41 @@
\ignorespaces%
}
%
+\def\psPoisson{\pst@object{psPoisson}}
+\def\psPoisson@i#1#2{%
+ \begin@SpecialObj%
+ \addto@pscode{
+ /scx { \pst@number\psxunit mul } def
+ /scy { \pst@number\psyunit mul } def
+ /N #1 def
+ /lambda #2 def
+ /elambda Euler #2 neg exp def % e^-lambda
+ /dx \psFunc@barwidth 2 div def
+ /kOld dx neg def
+ kOld scx 0 moveto % starting point
+ /Y elambda def % start value
+ 0 1 N { % N times
+ /k exch def % save loop variable
+ k 0 eq { /kFaculty 1 def }{ /kFaculty kFaculty k mul def } ifelse
+ /Y lambda k exp kFaculty div elambda mul def
+ kOld scx 0 L kOld scx Y scy L k dx add scx Y scy L
+ \ifPst@markZeros k dx add scx 0 L \fi
+ \ifPst@printValue
+ gsave \psk@PSfont findfont \psk@fontscale scalefont setfont
+ Y \psk@valuewidth string cvs
+ k scx \psk@fontscale 2 div add
+ Y scy \pst@number\pslabelsep add moveto
+ 90 rotate show grestore
+ \fi
+ /kOld kOld 1 add def
+ } for
+ \ifPst@markZeros\else k dx add scx 0 L \fi % last line down to x-axis
+ }%
+ \psk@fillstyle
+ \pst@stroke
+ \end@SpecialObj%
+}
+%
% Superellipese / Lamefunction
\define@key[psset]{pst-func}{radiusA}{\pst@getlength{#1}\pst@radiusA}
\define@key[psset]{pst-func}{radiusB}{\pst@getlength{#1}\pst@radiusB}