texlive[43423] Master/texmf-dist: pst-func (7mar17)

commits+karl at tug.org commits+karl at tug.org
Tue Mar 7 23:42:17 CET 2017


Revision: 43423
          http://tug.org/svn/texlive?view=revision&revision=43423
Author:   karl
Date:     2017-03-07 23:42:17 +0100 (Tue, 07 Mar 2017)
Log Message:
-----------
pst-func (7mar17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2017-03-07 18:10:02 UTC (rev 43422)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2017-03-07 22:42:17 UTC (rev 43423)
@@ -1,4 +1,5 @@
 ..... pst-func.tex
+0.83  2017-03-07  - added some more macros for binomial distributions
 0.82  2016-05-01  - psk at PontName->\psk at func@PointName (same name in pst-eucl)
 0.81  2014-05-20  - changed \pstVerb to \pst at Verb in \psZero to allow
                     variables from tx at Dict

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2017-03-07 18:10:02 UTC (rev 43422)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2017-03-07 22:42:17 UTC (rev 43423)
@@ -1032,14 +1032,17 @@
 
 
 \clearpage
+
+
+
 \subsection{Binomial distribution}\label{sec:bindistri}
-These two macros plot binomial distribution, \Lcs{psBinomialN} the normalized one.
-It is always done in the $x$-Intervall $[0;1]$.
-Rescaling to another one can be done by setting the \Lkeyword{xunit} option
-to any other value. 
+These five macros plot binomial probability mass function \Lcs{psBinomial} and \Lcs{psBinomialC} in curve style, the normalized one is \Lcs{psBinomialN}. The cumulative distribution function $F$ \Lcs{psBinomialF} and the complement of the cumulative distribution function to one ($1-F$) \Lcs{psBinomialFS}
+It is always done in the $y$-Intervall $[0;1]$.
+Rescaling to another one can be done by setting the \Lkeyword{yunit} option
+to any other value.
 
-The binomial distribution gives the discrete probability distribution $P_p(n|N)$ of obtaining
-exactly $n$ successes out of $N$ Bernoulli trials (where the result of each 
+The binomial distribution \Lcs{psBinomial} gives the discrete probability distribution $P_p(n|N)$ of obtaining
+exactly $n$ successes out of $N$ Bernoulli trials (where the result of each
 Bernoulli trial is true with probability $p$ and false with probability
 $q=1-p$. The binomial distribution is therefore given by
 
@@ -1048,7 +1051,7 @@
          &= \frac{N!}{n!(N-n)!}p^n(1-p)^{N-n},
 \end{align}
 
-where $(N; n)$ is a binomial coefficient and $P$ the probability. 
+where $(N; n)$ is a binomial coefficient and $P$ the probability.
 
 The syntax is quite easy:
 
@@ -1056,14 +1059,21 @@
 \Lcs{psBinomial}\OptArgs\Largb{N}\Largb{probability p}\\
 \Lcs{psBinomial}\OptArgs\Largb{m,N}\Largb{probability p}\\
 \Lcs{psBinomial}\OptArgs\Largb{m,n,N}\Largb{probability p}\\
-\Lcs{psBinomialN}\OptArgs\Largb{N}\Largb{probability p}
+\Lcs{psBinomialC}\OptArgs\Largb{N}\Largb{probability p}\\
+\Lcs{psBinomialN}\OptArgs\Largb{N}\Largb{probability p}\\
+\Lcs{psBinomialF}\OptArgs\Largb{N}\Largb{probability p}\\
+\Lcs{psBinomialF}\OptArgs\Largb{m,N}\Largb{probability p}\\
+\Lcs{psBinomialF}\OptArgs\Largb{m,n,N}\Largb{probability p}\\
+\Lcs{psBinomialFS}\OptArgs\Largb{N}\Largb{probability p}\\
+\Lcs{psBinomialFS}\OptArgs\Largb{m,N}\Largb{probability p}\\
+\Lcs{psBinomialFS}\OptArgs\Largb{m,n,N}\Largb{probability p}
 \end{BDef}
 
 \begin{itemize}
 \item with one argument $N$ the sequence $0\ldots N$ is calculated and plotted
-\item with two arguments $m,N$ the sequence $0\ldots N$ is calculated and 
+\item with two arguments $m,N$ the sequence $0\ldots N$ is calculated and
     the sequence $m\ldots N$ is plotted
-\item with three arguments $m,n,N$ the sequence $0\ldots N$ is calculated and 
+\item with three arguments $m,n,N$ the sequence $0\ldots N$ is calculated and
     the sequence $m\ldots n$ is plotted
 \end{itemize}
 
@@ -1071,23 +1081,38 @@
 one should expect problems with $N>100$. PostScript cannot handle such small values and there will
 be no graph printed. This happens on PostScript side, so \TeX\ doesn't report any problem in
 the log file. The valid options for the macros are \Lkeyword{markZeros} to draw rectangles instead
-of a continous line and \Lkeyword{printValue} for printing the $y$-values on top of the lines,
-rotated by 90\textdegree. For this option all other options from section~1 
-for the macro \Lcs{psPrintValue} are valid, too.~ \cite{pst-tools}  Important is the keyword \Lkeyword{valuewidth} 
+of a continous line and \Lkeyword{printValue} for printing the $y$-values in the color LabelColor $=$ color on top of the lines in distance labelsep and xlabelsep, rotated by labelangle $=\alpha$. For this option all other options from section~1
+for the macro \Lcs{psPrintValue} are valid, too.~ \cite{pst-tools}  Important is the keyword \Lkeyword{valuewidth}
 which is preset to 10. If your value has more characters when converting into a string, it will
 not be printed or cause an GhostScript error.
 
-The only special option is \Lkeyword{barwidth},
-which is a factor (no dimension) and set by default to 1. This option is only valid for
-the macro \Lcs{psBinomial} and not for the normalized one!
+Special options are 
+\begin{itemize}
+\item \Lkeyword{barwidth}, which is a factor (no dimension) and set by default to 1. This option is not valid for
+the macro \Lcs{psBinomialN}!
+\item \Lkeyword{labelangle} is the rotation of the printed values, default is 90\textdegree
+\item \Lkeyword{xlabelsep} is the x-separation of the printed values, default is 0 (no dimension)
+\item \Lkeyword{labelsep} is the y-separation of the printed values, default is 0.2 (no dimension)
+\item \Lkeyword{LabelColor} is the color of the printed values, default is black
+\item \Lkeyword{LineEnding} this boolean is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS}, default is true. Draws circles at the end of the lines
+\item \Lkeyword{VLines} this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS}, default is false. Draws the vertical lines dashed.
+\item \Lkeyword{rightEnd}, this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) and $n=N$, default is 2
+\item \Lkeyword{leftEnd}, this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) and $m=0$, default is 1
+\item \Lkeyword{radiusout}, this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) for the outer radius of the both dots left and right, default is 2
+\item \Lkeyword{radiusinL}, this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) for the inner radius of the left dot, default is 0 
+\item \Lkeyword{radiusinR}, this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) for the inner radius of the right dot, default is 1.5
+\item \Lkeyword{LineEndColorL} this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) for the color of the left dot, default is green
+\item \Lkeyword{LineEndColorR} this option is only valid for the macros \Lcs{psBinomialF} and \Lcs{psBinomialFS} when LineEnding=true (default) for the inner radius of the right dot, default is red
+\end{itemize}
 
 \psset[pst-func]{barwidth=1}
 \begin{LTXexample}[pos=t,preset=\centering]
 \psset{xunit=1cm,yunit=5cm}%
-\begin{pspicture}(-1,-0.15)(7,0.55)%
+\begin{pspicture}(-1,-0.15)(7,0.6)%
 \psaxes[Dy=0.2,dy=0.2\psyunit]{->}(0,0)(-1,0)(7,0.5)
 \uput[-90](7,0){$k$} \uput[90](0,0.5){$P(X=k)$}
-\psBinomial[markZeros,printValue,fillstyle=vlines]{6}{0.4}
+\psBinomial[markZeros,printValue,fillstyle=vlines,
+labelangle=80,LabelColor=blue]{6}{0.4}
 \end{pspicture}
 \end{LTXexample}
 
@@ -1096,8 +1121,9 @@
 \begin{pspicture}(-1,-0.05)(8,0.6)%
 \psaxes[Dy=0.2,dy=0.2\psyunit]{->}(0,0)(-1,0)(8,0.5)
 \uput[-90](8,0){$k$} \uput[90](0,0.5){$P(X=k)$}
+\psBinomialC[fillstyle=solid,opacity=0.5,fillcolor=cyan,plotstyle=curve]{7}{0.6}
 \psBinomial[linecolor=red,markZeros,printValue,fillstyle=solid,
-	fillcolor=blue,barwidth=0.2]{7}{0.6}
+	fillcolor=blue,barwidth=0.2,xlabelsep=-0.05]{7}{0.6}
 \end{pspicture}
 \end{LTXexample}
 
@@ -1109,6 +1135,7 @@
 \psBinomial[linecolor=black!30]{0,7}{0.6}
 \psBinomial[linecolor=blue,markZeros,printValue,fillstyle=solid,
 	fillcolor=blue,barwidth=0.4]{2,5,7}{0.6}
+\psBinomialC[,showpoints=true,plotstyle=curve]{7}{0.6}
 \end{pspicture}
 \end{LTXexample}
 
@@ -1125,6 +1152,35 @@
 \end{pspicture*}
 \end{LTXexample}
 
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{xunit=0.8cm,yunit=8cm}%
+\begin{pspicture*}[showgrid=false](-1.5,-0.1)(16,1.2)%
+\psset{arrowscale=1.3,arrowinset=0.05,arrowlength=1.9,comma}%
+\psaxes[labelFontSize=\scriptstyle,xticksize=0 1.07,yticksize=0 16,tickcolor=gray!50,
+        Dy=0.1,dy=0.1,Dx=1,dx=1,Ox=0]{->}(0,0)(-0.9,0)(16,1.1)
+\uput[-90](15.8,0){$z$}\uput[0](0,1.1){$P_{0,15}^{100}(Z=z)$}
+\psBinomialC[linecolor=cyan,fillstyle=solid,fillcolor=cyan!50,opacity=0.4,plotstyle=curve]{40}{0.15}%
+\psBinomial[markZeros,linecolor=BrickRed,fillstyle=solid,fillcolor=BrickRed,barwidth=0.75,opacity=0.6]{1,16,40}{0.15}%
+\psBinomialFS[markZeros,linecolor=Green,fillstyle=solid,fillcolor=orange,barwidth=0.3,opacity=0.6]{0,16,40}{0.15}%
+\psBinomialF[linecolor=gray,fillstyle=solid,fillcolor=yellow,barwidth=0.4,opacity=0.5]{3,16,40}{0.15}
+\end{pspicture*}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{xunit=0.75cm,yunit=7.5cm}%
+\begin{pspicture*}[showgrid=false](-1.3,-0.067)(14.67,1.13)%
+\psset{arrowscale=1.3,arrowinset=0.05,arrowlength=1.9,comma}
+\psaxes[labelFontSize=\scriptstyle,xticksize=0 1.07,yticksize=0 12,tickcolor=gray!50,Dy=0.1,dy=0.1,Dx=1,dx=1,Ox=0]{->}(0,0)(-0.9,0)(14,1.1)
+\uput[-90](13.8,0){$z$} \uput[0](0,1.08){$F_{0,7}^{10}(Z\leq z)$}
+\psBinomial[markZeros,linecolor=orange,fillstyle=solid,fillcolor=orange,barwidth=1,opacity=0.5]{0,10,10}{0.7}
+\psBinomialF[markZeros,linecolor=blue,linewidth=0.7pt,barwidth=0.2,
+opacity=0.5,fillstyle=solid,fillcolor=blue,valuewidth=15]{0,13,10}{0.7}
+\psBinomialFS[LineEnding=false,linecolor=BrickRed,linewidth=0.9pt,VLines=true]{0,10,10}{0.7}
+\psBinomialF[linecolor=Green,printValue=false,linewidth=1.2pt,LineEndColorR=BrickRed,LineEndColorL=Green!70,
+radiusout=3.5,radiusinL=0,radiusinR=2,LineEnding=true,leftEnd=1,rightEnd=3]{0,10,10}{0.7}
+\end{pspicture*}
+\end{LTXexample}
+
 The default binomial distribution has the mean of $\mu=E(X)=N\cdot p$
 and a variant of $\sigma^2=\mu\cdot(1-p)$.
 The normalized distribution has a mean of $0$. Instead of $P(X=k)$
@@ -1166,7 +1222,7 @@
 \end{pspicture*}
 \end{LTXexample}
 
-For the normalized distribution the plotstyle can be set to \Lkeyval{curve} (\Lkeyset{plotstyle=curve}), 
+For the normalized distribution the plotstyle can be set to \Lkeyval{curve} (\Lkeyset{plotstyle=curve}),
 then the binomial distribution looks like a normal distribution. This option is only
 valid for \Lcs{psBinomialN}. The option \Lkeyword{showpoints} is valid if \Lkeyval{curve} was chosen.
 
@@ -1190,6 +1246,8 @@
 \end{pspicture*}
 \end{LTXexample}
 
+
+
 \clearpage
 \subsection{Poisson distribution}
 Given a Poisson process\footnote{\url{http://mathworld.wolfram.com/PoissonProcess.html}}, 

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2017-03-07 18:10:02 UTC (rev 43422)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2017-03-07 22:42:17 UTC (rev 43423)
@@ -19,7 +19,7 @@
 %%
 \csname PSTfuncLoaded\endcsname
 \let\PSTfuncLoaded\endinput
-% Requires some PSTricks packages 
+% Requires some PSTricks packages
 \ifx\PSTricksLoaded\endinput\else   \input pstricks.tex\fi
 \ifx\PSTnodesLoaded\endinput\else   \input pst-plot.tex\fi
 \ifx\PSTmathLoaded\endinput \else   \input pst-math.tex\fi
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at addfams{pst-func}
 %
-\def\fileversion{0.82}
-\def\filedate{2016/05/01}
+\def\fileversion{0.83}
+\def\filedate{2017/03/07}
 \message{`PST-func' v\fileversion, \filedate\space (hv)}
 %
 \pstheader{pst-func.pro}
@@ -94,7 +94,7 @@
        coeff=0 1,      % coeff=a0 a1 a2 a3 ...
        Derivation=0, % 0 is the original function
        markZeros=false,% no dots for the zeros
-       epsZero=0.1,    % the distance between two zero points   
+       epsZero=0.1,    % the distance between two zero points
        dZero=0.1,      % the distance of the x value for scanning the function
        zeroLineTo=-1,  % a line to the value of the lineTo's Derivation (-1= none)
        zeroLineStyle=dashed,%
@@ -139,7 +139,7 @@
   y0 % the returned value ist the zero point
   0 \tx at ScreenCoor pstack
   3 0 360 arc gsave 0 0 1 setrgbcolor fill grestore 1 setlinewidth stroke
-} def 
+} def
 \fi
 %
 \def\psPolynomial{\pst at object{psPolynomial}}
@@ -157,7 +157,7 @@
     /dx x1 x0 sub \psk at plotpoints\space div def
     /Derivation \psk at Derivation\space def
     /x x0 def
-    \ifPst at markZeros 
+    \ifPst at markZeros
       5 dict begin % hold all local!
       gsave
       \pst at number\psk at zeroLineWidth SLW
@@ -168,10 +168,10 @@
         xZero \pst at number\psxunit mul /xPixel exch def
         \psk at dotsize
         \@nameuse{psds@\psk at dotstyle}%
-        xPixel 0 Dot 
+        xPixel 0 Dot
         \psk at zeroLineTo\space 0 ge { % line to function \psk at lineTo
           xPixel 0 moveto
-          xZero coeff \psk at zeroLineTo\space FuncValue 
+          xZero coeff \psk at zeroLineTo\space FuncValue
           \pst at number\psyunit mul xPixel exch L
           \@nameuse{psls@\psk at zeroLineStyle}
         } if
@@ -180,7 +180,7 @@
       end
     \fi
     /xy {
-      x \psk at xShift\space sub coeff Derivation FuncValue \pst at number\psyunit mul 
+      x \psk at xShift\space sub coeff Derivation FuncValue \pst at number\psyunit mul
       x \pst at number\psxunit mul exch
     } def
     xy moveto
@@ -210,7 +210,7 @@
     mark
     /n 2 def
     \psk at plotpoints {
-      xy 
+      xy
       n 2 roll
       /n n 2 add def
       /x x dx add def
@@ -257,13 +257,13 @@
   \psplot{#2}{#3}[ /nue \psk at nue def /epsilon 1e-20 def ]{%
     /Sum 0 def
     /Iter 0 def
-    {/Sum_Iter  
+    {/Sum_Iter
        x dup mul 4 div Iter exp        % nominator
        nue Iter add 1 add GAMMA Iter tx at AddMathFunc begin ! end mul  % denominator
        Div def
      Sum_Iter abs epsilon lt { exit } if
      /Sum Sum Sum_Iter add def
-     /Iter Iter 1 add  def 
+     /Iter Iter 1 add  def
     } loop
     x 0.5 mul nue exp Sum mul
   }%
@@ -280,7 +280,7 @@
     \psset{plotpoints=200}%
     \psset{#1}%
     \psplot[algebraic=false]{#2}{#3}{%
-        Euler x \psk at mue sub dup mul 2 div \psk at sigma dup mul div neg exp 
+        Euler x \psk at mue sub dup mul 2 div \psk at sigma dup mul div neg exp
 	1.0 \psk at sigma div TwoPi sqrt div mul%
     }%
 }\ignorespaces}
@@ -296,13 +296,13 @@
     /a #1  def
     /dx #2 #1 sub \psk at plotpoints\space div def
     /b a dx add def
-    /scx { \pst at number\psxunit mul } def 
+    /scx { \pst at number\psxunit mul } def
     /scy { \pst at number\psyunit mul } def
-    tx at FuncDict begin 
+    tx at FuncDict begin
     /C 1 \psk at sigma div TwoPi sqrt div def
     /SFunc {% x on Stack
-      Euler exch \psk at mue\space sub dup mul 2 div \psk at sigma\space dup mul div neg exp C mul 
-    } def 
+      Euler exch \psk at mue\space sub dup mul 2 div \psk at sigma\space dup mul div neg exp C mul
+    } def
     end
 %    a scx 0 moveto
     a scx 0 \@nameuse{beginqp@\psplotstyle}
@@ -309,7 +309,7 @@
     \psk at plotpoints 1 sub {
       a b \psk at Simpson % a b M on Stack
       tx at FuncDict begin Simpson I end % y value on stack
-      scy b scx exch \@nameuse{doqp@\psplotstyle} %lineto 
+      scy b scx exch \@nameuse{doqp@\psplotstyle} %lineto
       /b b dx add def
     } repeat
 %    stroke
@@ -397,17 +397,17 @@
 \def\psPrintValue at i#1{\expandafter\psPrintValue at ii#1,,\@nil}
 \def\psPrintValue at ii#1,#2,#3\@nil{%  #1,#2 only for algebraic code
   \begin at SpecialObj
-  \addto at pscode{  
-     gsave \psk at PSfont findfont \psk at fontscale scalefont setfont 
-     \ifPst at algebraic 
-       /x #1 def 
-       /Func (#2) tx at AlgToPs begin AlgToPs end cvx def 
-       Func 
+  \addto at pscode{
+     gsave \psk at PSfont findfont \psk at fontscale scalefont setfont
+     \ifPst at algebraic
+       /x #1 def
+       /Func (#2) tx at AlgToPs begin AlgToPs end cvx def
+       Func
      \else #1 \fi
      \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul cvi exch div } if
      \psk at valuewidth string cvs %/Output exch def % save output
      \ifPst at comma dot2comma \fi        % do we have to change dot to comma
-     \psk at xShift\space 0 moveto  %Output 
+     \psk at xShift\space 0 moveto  %Output
      show grestore
   }%
   \end at SpecialObj%
@@ -425,20 +425,20 @@
      /mfont { \psk at PSfont findfont \psk at fontscale scalefont setfont } bind def
      /mfontexp { \psk at PSfont findfont \psk at fontscale 1.2 div scalefont setfont } bind def
      /s1 { /Symbol findfont \psk at fontscale scalefont setfont } bind def
-     \ifPst at algebraic 
+     \ifPst at algebraic
         /x #1 def
-        /Func (#2) tx at AlgToPs begin AlgToPs end cvx def 
-        Func  
+        /Func (#2) tx at AlgToPs begin AlgToPs end cvx def
+        Func
      \else #1 \fi
      /value ED
      \psk at Scin {
        value 0 ne { value log floor cvi /expon ED }{ /expon 0 def } ifelse
-       value 10 expon exp div 
-       \psk at decimals -1 gt { 10  \psk at decimals exp dup 3 1 roll mul 
+       value 10 expon exp div
+       \psk at decimals -1 gt { 10  \psk at decimals exp dup 3 1 roll mul
          \ifPst at round round \else cvi \fi  exch div } if
        \psk at decimals 0 eq { cvi } if /numb ED
        expon \psk at valuewidth string cvs /expon exch def
-       numb \psk at valuewidth string cvs 
+       numb \psk at valuewidth string cvs
        \ifPst at comma dot2comma \fi  % do we have to change dot to comma
        /Output exch def
        /txspc \psk at fontscale 4 div def
@@ -447,12 +447,12 @@
        txspc 0 rmoveto mfont (10) show
        txspc 2 div txspc 1.5 mul rmoveto mfontexp expon show }
      { value
-       \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul 
+       \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul
          \ifPst at round round \else cvi \fi exch div } if
        \psk at decimals 0 eq { cvi } if %inserted to handle decimals=0
-       \psk at valuewidth string cvs 
+       \psk at valuewidth string cvs
        \ifPst at comma dot2comma \fi         % do we have to change dot to comma
-       \psk at xShift\space 0 moveto mfont %Output 
+       \psk at xShift\space 0 moveto mfont %Output
        show
      } ifelse
   }%
@@ -522,8 +522,22 @@
 }%
 %
 \define at boolkey[psset]{pst-func}[Pst@]{printValue}[true]{}
+\define at boolkey[psset]{pst-func}[Pst@]{LineEnding}[true]{}
+\define at boolkey[psset]{pst-func}[Pst@]{VLines}[true]{}
 \define at key[psset]{pst-func}{barwidth}[1]{\def\psFunc at barwidth{#1 }}% a factor, not a dimen
-\psset[pst-func]{printValue=false,barwidth=1}
+\define at key[psset]{pst-func}{rightEnd}[2]{\def\psFunc at rightEnd{#1 }}
+\define at key[psset]{pst-func}{leftEnd}[2]{\def\psFunc at leftEnd{#1 }}
+\define at key[psset]{pst-func}{labelangle}[90]{\def\psFunc at langle{#1 }}
+\define at key[psset]{pst-func}{xlabelsep}[0]{\def\psFunc at xlabelsep{#1 }}
+\define at key[psset]{pst-func}{radiusout}[2]{\def\psFunc at radiusout{#1 }}
+\define at key[psset]{pst-func}{radiusinL}[0]{\def\psFunc at radiusinL{#1 }}
+\define at key[psset]{pst-func}{radiusinR}[1.5]{\def\psFunc at radiusinR{#1 }}
+\define at key[psset]{pst-func}{LabelColor}[black]{\pst at getcolor{#1}\psk at LabelColor}
+\define at key[psset]{pst-func}{LineEndColorL}[green]{\pst at getcolor{#1}\psk at LineEndColorL}
+\define at key[psset]{pst-func}{LineEndColorR}[red]{\pst at getcolor{#1}\psk at LineEndColorR}
+\define at key[psset]{pst-func}{vlinestyle}[solid]{\def\psvlinestyle{#1}}
+\psset[pst-func]{printValue=false,barwidth=1,labelangle=90,xlabelsep=0,LabelColor=black,LineEndColorL=green,LineEndColorR=red,
+radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLines=false}
 %
 \def\psBinomial{\pst at object{psBinomial}}
 \def\psBinomial at i#1#2{\psBinomial at ii#1,,,\@nil{#2}}%
@@ -565,12 +579,12 @@
       kOld scx Y scy L k dx add scx Y scy L
       \ifPst at markZeros k dx add scx 0 L kOld 1 add scx 0 L \fi
       \ifPst at printValue
-        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont
-        Y \psk at valuewidth string cvs 
+        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont \pst at usecolor\psk at LabelColor %
+        Y \psk at valuewidth string cvs
         \ifPst at comma dot2comma \fi
-        k scx \psk at fontscale 2 div add
+        k scx \psk at fontscale 2 div add \psFunc at xlabelsep scx add
         Y scy \pst at number\pslabelsep add moveto
-        90 rotate show grestore
+        \psFunc at langle rotate show grestore
       \fi
       /kOld kOld 1 add def
     } for
@@ -581,8 +595,246 @@
   \end at OpenObj%
 }%
 %
-\def\psBinomialN{\pst at object{psBinomialN}}
+\def\psBinomialN{\pst at object{psBinomialN}}%
 \def\psBinomialN at i#1#2{%
+\leavevmode
+\pst at killglue
+\begingroup
+\use at par
+\init at pscode
+\def\cplotstyle{curve}%
+\ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle}\fi
+\addto at pscode{%
+\ifx\psplotstyle\cplotstyle /Curve true def \else /Curve false def \fi
+    /scx { \pst at number\psxunit mul } def
+    /scy { \pst at number\psyunit mul } def
+    /N #1 def
+    /p #2 def				% probability
+    /q 1 p sub def
+    /E N p mul def
+    /sigma E q mul sqrt def 		% variant
+    /dx 1.0 sigma div 2 div def
+    /xOld dx neg E sub sigma div def
+    /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
+    ifelse
+   0 1 N {%				% N times
+      /k exch def			% save loop variable
+      k 0 eq
+        { /Y q N exp def }
+        { /Y Y N k sub 1 add mul k div p mul q div def }
+      ifelse % recursive definition
+      /x k E sub sigma div dx add def
+      /y Y sigma mul def		% normalize
+      Curve
+        { x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def}
+        { xOld scx y scy L x scx y scy L
+          \ifPst at markZeros x scx 0 L \fi %
+        } ifelse
+      \ifPst at printValue
+        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont \pst at usecolor\psk at LabelColor %
+        y \psk at valuewidth string cvs %/Output exch def
+        \ifPst at comma dot2comma \fi      % do we have to change dot to comma
+        x dx sub scx \psk at fontscale 2 div add \psFunc at xlabelsep scx add
+        y scy \pst at number\pslabelsep add moveto
+        \psFunc at langle rotate show grestore
+      \fi
+      /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 at fillstyle
+\pst at stroke
+\fi
+\use at pscode
+\endgroup
+\ignorespaces%
+}%
+\def\psBinomialF{\pst at object{psBinomialF}}
+\def\psBinomialF at i#1#2{\psBinomialF at ii#1,,,\@nil{#2}}%
+\def\psBinomialF at ii#1,#2,#3,#4\@nil#5{%
+  \def\pst at tempA{#2}%
+  \ifx\pst at tempA\@empty
+    \psBinomialF at iii{0}{#1}{#1}{#5}%
+  \else
+    \def\pst at tempA{#3}%
+    \ifx\pst at tempA\@empty\psBinomialF at iii{#1}{#2}{#2}{#5}%
+    \else\psBinomialF at iii{#1}{#2}{#3}{#5}\fi
+  \fi}%
+\def\psBinomialF at iii#1#2#3#4{%
+  \begin at OpenObj%
+  \addto at pscode{
+    /scx { \pst at number\psxunit mul } def
+    /scy { \pst at number\psyunit mul } def
+    /m #1 def
+    /n #2 def
+    /N #3 def
+    /p #4 def
+    /dx \psFunc at barwidth 2 div def
+    /q 1 p sub def
+    \ifPst at markZeros /kOld dx neg m add def \else
+    /kOld m def \fi
+    kOld scx 0 moveto   % starting point
+    0 1 m 1 sub {
+      /k exch def       % save loop variable
+      k 0 eq
+        { /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}
+      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}
+        { /Y Y N k sub 1 add mul k div p mul q div def
+          /F F Y add def}
+      ifelse % recursive definition
+      \ifPst at 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 at LineEnding
+      k 0 eq
+      { }
+      { kOld scx F scy newpath \psFunc at radiusout 0 360 arc kOld scx F scy \psFunc at radiusinL 360 0 arcn closepath \pst at usecolor\psk at LineEndColorL fill } ifelse \fi
+      kOld \ifPst at LineEnding\psFunc at radiusout\pst at number\psxunit div add \fi
+      k 0 eq
+      { \psFunc at leftEnd sub }
+      { } ifelse
+      scx F scy moveto
+      k 1 add
+      \ifPst at LineEnding\psFunc at radiusout\pst at number\psxunit div sub \fi
+       k N eq
+      { \psFunc at rightEnd add }
+      { } ifelse
+      scx F scy L \pst at usecolor\pslinecolor [1 0] 0 setdash stroke
+      \ifPst at LineEnding
+      k N eq
+      { }
+      { k 1 add scx F scy newpath \psFunc at radiusout 0 360 arc k 1 add scx F scy \psFunc at radiusinR 360 0 arcn closepath \pst at usecolor\psk at LineEndColorR fill } 
+      ifelse
+        \ifPst at VLines
+        Y \psFunc at radiusout\pst at number\psyunit div 2 mul le
+        { }
+        { k scx F Y sub \psFunc at radiusout\pst at number\psyunit div add scy moveto k scx F \psFunc at radiusout\pst at number\psyunit div sub scy L \pst at usecolor\pslinecolor [3 2] 0 setdash stroke } ifelse \fi
+      \else
+      \ifPst at VLines
+      Y \psFunc at radiusout\pst at number\psyunit div 0.1 mul le
+      { }
+      { k scx F Y sub scy moveto k scx F scy L \pst at usecolor\pslinecolor [3 2] 0 setdash stroke } ifelse
+     \fi\fi\fi
+      \ifPst at printValue
+        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont \pst at usecolor\psk at LabelColor %
+        F \psk at valuewidth string cvs
+        \ifPst at comma dot2comma \fi
+        k scx \psk at fontscale 2 div add \psFunc at xlabelsep scx add
+        F scy \pst at number\pslabelsep add moveto
+        \psFunc at langle rotate show grestore
+      \fi
+      /kOld kOld 1 add def
+    } for
+  }%
+  \end at OpenObj%
+}%
+%
+\def\psBinomialFS{\pst at object{psBinomialFS}}
+\def\psBinomialFS at i#1#2{\psBinomialFS at ii#1,,,\@nil{#2}}%
+\def\psBinomialFS at ii#1,#2,#3,#4\@nil#5{%
+  \def\pst at tempA{#2}%
+  \ifx\pst at tempA\@empty
+    \psBinomialFS at iii{0}{#1}{#1}{#5}%
+  \else
+    \def\pst at tempA{#3}%
+    \ifx\pst at tempA\@empty\psBinomialFS at iii{#1}{#2}{#2}{#5}%
+    \else\psBinomialFS at iii{#1}{#2}{#3}{#5}\fi
+  \fi}%
+\def\psBinomialFS at iii#1#2#3#4{%
+  \begin at OpenObj%
+  \addto at pscode{
+    /scx { \pst at number\psxunit mul } def
+    /scy { \pst at number\psyunit mul } def
+    /m #1 def
+    /n #2 def
+    /N #3 def
+    /p #4 def
+    /dx \psFunc at barwidth 2 div def
+    /q 1 p sub def
+    \ifPst at markZeros /kOld dx neg m add def \else
+    /kOld m def \fi
+    kOld scx 0 moveto   % starting point
+    0 1 m 1 sub {
+      /k exch def       % save loop variable
+      k 0 eq
+        { /Y q N exp def
+          /F Y def
+          /FS 1 F sub def}
+        { /Y Y N k sub 1 add mul k div p mul q div def
+          /F F Y add def
+          /FS 1 F sub 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
+          /FS 1 F sub def}
+        { /Y Y N k sub 1 add mul k div p mul q div def
+          /F F Y add def
+          /FS 1 F sub def}
+      ifelse % recursive definition
+      \ifPst at markZeros kOld scx FS scy L k dx add scx FS scy L k dx add scx 0 L kOld 1 add scx 0 L
+      \else
+      \ifPst at LineEnding
+      k 0 eq
+      { }
+      { kOld scx FS scy newpath \psFunc at radiusout 0 360 arc kOld scx FS scy \psFunc at radiusinL 360 0 arcn closepath \pst at usecolor\psk at LineEndColorL fill } ifelse \fi
+      kOld \ifPst at LineEnding\psFunc at radiusout\pst at number\psxunit div add \fi
+      k 0 eq
+      { \psFunc at leftEnd sub }
+      { } ifelse
+      scx FS scy moveto
+      k 1 add
+      \ifPst at LineEnding\psFunc at radiusout\pst at number\psxunit div sub \fi
+       k N eq
+      { \psFunc at rightEnd add }
+      { } ifelse
+      scx FS scy L \pst at usecolor\pslinecolor [1 0] 0 setdash stroke
+      \ifPst at LineEnding
+      k N eq
+      { }
+      { k 1 add scx FS scy newpath \psFunc at radiusout 0 360 arc k 1 add scx FS scy \psFunc at radiusinR 360 0 arcn closepath \pst at usecolor\psk at LineEndColorR fill }
+      ifelse
+        \ifPst at VLines
+        Y \psFunc at radiusout\pst at number\psyunit div 2 mul le
+        { }
+        {  k scx FS Y add \psFunc at radiusout\pst at number\psyunit div sub scy moveto k scx FS \psFunc at radiusout\pst at number\psyunit div add scy L \pst at usecolor\pslinecolor [3 2] 0 setdash stroke } ifelse \fi
+      \else
+      \ifPst at VLines
+      Y \psFunc at radiusout\pst at number\psyunit div 0.1 mul le
+      { }
+      { k scx FS Y add scy moveto k scx FS scy L \pst at usecolor\pslinecolor [3 2] 0 setdash stroke } ifelse
+     \fi\fi\fi
+      \ifPst at printValue
+        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont \pst at usecolor\psk at LabelColor %
+        FS \psk at valuewidth string cvs
+        \ifPst at comma dot2comma \fi
+        k scx \psk at fontscale 2 div add \psFunc at xlabelsep scx add
+        FS scy \pst at number\pslabelsep add moveto
+        \psFunc at langle rotate show grestore
+      \fi
+      /kOld kOld 1 add def
+    } for
+  }%
+  \end at OpenObj%
+}%
+%
+\def\psBinomialC{\pst at object{psBinomialC}}
+\def\psBinomialC at i#1#2{%
   \leavevmode
   \pst at killglue
   \begingroup
@@ -589,57 +841,59 @@
   \use at par
   \init at pscode
   \def\cplotstyle{curve}%
-  \ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle} \fi%
-  \addto at pscode{
+  \ifx\psplotstyle\cplotstyle \@nameuse{beginplot@\psplotstyle}\fi
+  \addto at pscode{%
     \ifx\psplotstyle\cplotstyle /Curve true def \else /Curve false def \fi
-    /scx { \pst at number\psxunit mul } def 
+    /scx { \pst at number\psxunit mul } def
     /scy { \pst at number\psyunit mul } def
-    /N #1 def 
-    /p #2 def				% probability
-    /q 1 p sub def
-    /E N p mul def
-    /sigma E q mul sqrt def 		% variant
+    /N #1 def
+    /p #2 def				% Wahrscheinlichkeit
+    /q 1 p sub def          % q = 1 - p
+    /E N p mul def            % Erwartungswert
+    /sigma E q mul sqrt def 		% Varianz
     /dx 1.0 sigma div 2 div def
     /xOld dx neg E sub sigma div def
-    /xEnd xOld neg dx add scx def
-    Curve 
+    /xEnd xOld neg E add dx add scx def
+%    /xOld dx neg sigma div def
+%    /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
-    ifelse 
+    ifelse
    0 1 N {				% N times
       /k exch def			% save loop variable
-      k 0 eq 
+      k 0 eq
         { /Y q N exp def }
         { /Y Y N k sub 1 add mul k div p mul q div def }
       ifelse % recursive definition
-      /x k E sub sigma div dx add def
-      /y Y sigma mul def		% normalize
-      Curve 
+      /x k 1 div dx add def
+      /y Y 1 mul def		% normalize
+      Curve
         { x dx sub scx y scy Coors aload length 2 add array astore /Coors exch def}
         { xOld scx y scy L x scx y scy L
-          \ifPst at markZeros x scx 0 L \fi % 
+          \ifPst at markZeros x scx 0 L \fi %
         } ifelse
-      \ifPst at printValue 
-        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont 
+      \ifPst at printValue
+        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont \pst at usecolor\psk at LabelColor %
         y \psk at valuewidth string cvs %/Output exch def
         \ifPst at comma dot2comma \fi      % do we have to change dot to comma
-        x dx sub scx \psk at fontscale 2 div add 
-        y scy \pst at number\pslabelsep add moveto 
-        90 rotate show grestore
+        x dx sub scx \psk at fontscale 2 div add \psFunc at xlabelsep scx add
+        y scy \pst at number\pslabelsep add moveto
+        \psFunc at langle rotate show grestore
       \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 at fillstyle%
-    \pst at stroke%
-  \fi%
-  \use at pscode%
-  \endgroup%
-  \ignorespaces%
-}
+\ifx\psplotstyle\cplotstyle\@nameuse{endplot@\psplotstyle}\else
+  \psk at fillstyle
+  \pst at stroke
+\fi
+\use at pscode
+\endgroup
+\ignorespaces}
 %
+%
 \def\psPoisson{\pst at object{psPoisson}}% with contributions from Gerry Coombes
 \def\psPoisson at i#1#2{\psPoisson at ii#1,,\@nil{#2}}%
 \def\psPoisson at ii#1,#2,#3\@nil#4{%
@@ -709,9 +963,9 @@
   \else
     \addbefore at par{plotpoints=200,alpha=1,beta=1}%
     \begin at OpenObj
-    \psplot[algebraic=false]{#1}{#2}{ 
+    \psplot[algebraic=false]{#1}{#2}{
       \psk at beta \psk at alpha add GAMMA
-      \psk at beta GAMMA \psk at alpha GAMMA mul div 
+      \psk at beta GAMMA \psk at alpha GAMMA mul div
       1 x sub \psk at beta 1.0 sub exp mul
       x \psk at alpha 1.0 sub exp mul }
     \end at OpenObj%
@@ -803,7 +1057,7 @@
   \ifdim#1pt<\z@ \psline(#1,0)(0,0)\def\pst at tempA{0}\fi
   \psplot[algebraic=false]{\pst at tempA}{#2}{
     \psk at alpha \psk at beta \psk at alpha neg exp mul % alpha*beta^(-alpha)
-    x \psk at alpha 1 sub exp                      % x^(alpha-1) 
+    x \psk at alpha 1 sub exp                      % x^(alpha-1)
     mul
     Euler x \psk at beta div \psk at alpha exp neg exp % e^(-(x/beta)^alpha))
     mul }
@@ -848,41 +1102,41 @@
 \iffalse
   \def\Lorenz at code{
   /D {} def
-  [ \L at Data\space counttomark dup 
+  [ \L at Data\space counttomark dup
     1 sub /m ED 2 div cvi /n ED % m=0..n-1    n=number of pairs
   ] /xyValues ED
-  /Xval [] def  /Yval [] def /Xmax 0 def 
+  /Xval [] def  /Yval [] def /Xmax 0 def
   /Xsum 0 def /Ysum 0 def /XYsum 0 def
   xyValues aload pop             	% [ x y x y x y ... ]
   n { 2 copy mul XYsum add /XYsum ED
-      dup 
-      Yval aload length 1 add array astore /Yval ED 
+      dup
+      Yval aload length 1 add array astore /Yval ED
       Ysum add /Ysum ED
       dup
-      Xval aload length 1 add array astore /Xval ED 
+      Xval aload length 1 add array astore /Xval ED
       dup Xsum add /Xsum ED
       dup Xmax gt { /Xmax ED }{ pop } ifelse
   } repeat
   Xval bubblesort /Xval ED
   Yval bubblesort /Yval ED
-  Xval { Xmax div } forall n array astore /XvalRelMax ED 
-  Xval { Xsum div } forall n array astore /XvalRel ED 
-  Yval { Ysum div } forall n array astore /YvalRel ED 
-  0 1 n 1 sub { 
+  Xval { Xmax div } forall n array astore /XvalRelMax ED
+  Xval { Xsum div } forall n array astore /XvalRel ED
+  Yval { Ysum div } forall n array astore /YvalRel ED
+  0 1 n 1 sub {
     cvi /Index ED
-    Xval Index get 
+    Xval Index get
     Yval Index get
     mul } for
   n array astore /XmulY ED
-  XmulY aload length 1 sub { add } repeat 
+  XmulY aload length 1 sub { add } repeat
   /XmulYsum ED
-  XmulY { XmulYsum div } forall 
+  XmulY { XmulYsum div } forall
   n array astore /XmulYdivXmulYsum ED
   /X [0] def
   /Y [0] def
   /Xsum 0 def /Ysum 0 def
   0 1 n 1 sub {
-    /Index ED 
+    /Index ED
 %    XvalRel Index get Xsum add /Xsum ED
 %    X aload length 1 add Xsum exch array astore /X ED
     X aload length 1 add XvalRelMax Index get exch array astore /X ED %%
@@ -891,23 +1145,23 @@
   } for
   \ifPst at Gini
   0 % start value for Gini
-  0 1 X length 2 sub { 
+  0 1 X length 2 sub {
     /Index ED
     Y Index get Y Index 1 add get add 2 div % yHeight=(y0+y1)/2
-    X Index 1 add get X Index get sub abs   % xWidth=x1-x0 
+    X Index 1 add get X Index get sub abs   % xWidth=x1-x0
     mul % x*y
     add
   } for
   2 mul 1 sub neg % triangle area divided by the area under the polygon
-  \psk at PSfont findfont \psk at fontscale scalefont setfont 
+  \psk at PSfont findfont \psk at fontscale scalefont setfont
   \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul cvi exch div } if
   \psk at valuewidth string cvs %/Output exch def % save output
   \ifPst at comma dot2comma \fi      % do we have to change dot to comma
   /Output ED
-  \psk at xShift\space -30 moveto (Gini: ) show 
-  Output show 
+  \psk at xShift\space -30 moveto (Gini: ) show
+  Output show
   \fi
-  0 1 n { dup X exch get exch Y exch get } for 
+  0 1 n { dup X exch get exch Y exch get } for
   \if at star 1 0 0 0 \fi                   % add values for the closed curve
   }% filling the area under the curve.
 \fi
@@ -914,29 +1168,29 @@
 %%%%%%%%%%%%%%%%%%%%%%5
   \def\Lorenz at code{
   [ #1 ] dup length /n ED
-  bubblesort /Yval ED 
+  bubblesort /Yval ED
   [ 1 1 n { } for ] /Xval ED
-  /Xsum n dup 1 add mul 2 div cvi def 
+  /Xsum n dup 1 add mul 2 div cvi def
   /Ysum 0 def /XYsum 0 def
   0 Yval { add } forall /Ysum ED
-  Xval { n div } forall n array astore /XvalRelMax ED 
-  Xval { Xsum div } forall n array astore /XvalRel ED 
-  Yval { Ysum div } forall n array astore /YvalRel ED 
-  0 1 n 1 sub { 
+  Xval { n div } forall n array astore /XvalRelMax ED
+  Xval { Xsum div } forall n array astore /XvalRel ED
+  Yval { Ysum div } forall n array astore /YvalRel ED
+  0 1 n 1 sub {
     /Index ED
-    Xval Index get 
+    Xval Index get
     Yval Index get
     mul } for
   n array astore /XmulY ED
-  XmulY aload length 1 sub { add } repeat 
+  XmulY aload length 1 sub { add } repeat
   /XmulYsum ED
-  XmulY { XmulYsum div } forall 
+  XmulY { XmulYsum div } forall
   n array astore /XmulYdivXmulYsum ED
   /X [0] def
   /Y [0] def
   /Xsum 0 def /Ysum 0 def
   0 1 n 1 sub {
-    /Index ED 
+    /Index ED
 %    XvalRel Index get Xsum add /Xsum ED
 %    X aload length 1 add Xsum exch array astore /X ED
     X aload length 1 add XvalRelMax Index get exch array astore /X ED %%
@@ -945,23 +1199,23 @@
   } for
   \ifPst at Gini
   0 % start value for Gini
-  0 1 X length 2 sub { 
+  0 1 X length 2 sub {
     /Index ED
     Y Index get Y Index 1 add get add 2 div % yHeight=(y0+y1)/2
-    X Index 1 add get X Index get sub abs   % xWidth=x1-x0 
+    X Index 1 add get X Index get sub abs   % xWidth=x1-x0
     mul % x*y
     add
   } for
   2 mul 1 sub neg % triangle area divided by the area under the polygon
-  \psk at PSfont findfont \psk at fontscale scalefont setfont 
+  \psk at PSfont findfont \psk at fontscale scalefont setfont
   \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul cvi exch div } if
   \psk at valuewidth string cvs %/Output exch def % save output
   \ifPst at comma dot2comma \fi      % do we have to change dot to comma
   /Output ED
-  \psk at xShift\space -30 moveto (Gini: ) show 
-  Output show 
+  \psk at xShift\space -30 moveto (Gini: ) show
+  Output show
   \fi
-  0 1 n { dup X exch get exch Y exch get } for 
+  0 1 n { dup X exch get exch Y exch get } for
   \if at star 1 0 0 0 \fi                   % add values for the closed curve
   }% filling the area under the curve.
   \if at star\listplot*{\Lorenz at code}\else\listplot{\Lorenz at code}%
@@ -982,9 +1236,9 @@
   \addbefore at par{plotpoints=200}%
   \use at par
   \parametricplot{0}{360}{%
-     t cos dup mul 1 #1\space div exp \pst at radiusA \pst at number\psxunit div mul 
+     t cos dup mul 1 #1\space div exp \pst at radiusA \pst at number\psxunit div mul
      t 90 gt { t 270 lt { neg } if } if
-     t sin dup mul 1 #1\space div exp \pst at radiusB \pst at number\psyunit div mul 
+     t sin dup mul 1 #1\space div exp \pst at radiusB \pst at number\psyunit div mul
      t 180 gt { neg } if }
   \endgroup\ignorespaces}
 %
@@ -996,9 +1250,9 @@
   \psplot{#1}{#2}[/ps at a #3 def /ps at b #4 def]{
     /ps at n 0 def
     /ps at WS 0 def
-    { 
-      ps at a ps at n exp ps at b ps at n exp Pi mul x mul RadtoDeg cos mul 
-      dup abs \psk at epsilon gt { ps at WS add /ps at WS ED }{ ps at WS add exit } ifelse   
+    {
+      ps at a ps at n exp ps at b ps at n exp Pi mul x mul RadtoDeg cos mul
+      dup abs \psk at epsilon gt { ps at WS add /ps at WS ED }{ ps at WS add exit } ifelse
       ps at n 1 add /ps at n ED
     } loop
   }%
@@ -1010,9 +1264,9 @@
   \psplot{#1}{#2}[/ps at a #3 def]{
     /ps at k 1 def
     /ps at WS 0 def
-    { 
-      ps at k ps at a exp Pi mul dup x mul RadtoDeg sin exch div 
-      dup abs \psk at epsilon gt { ps at WS add /ps at WS ED }{ ps at WS add exit } ifelse   
+    {
+      ps at k ps at a exp Pi mul dup x mul RadtoDeg sin exch div
+      dup abs \psk at epsilon gt { ps at WS add /ps at WS ED }{ ps at WS add exit } ifelse
       ps at k 1 add /ps at k ED
     } loop
   }%
@@ -1044,12 +1298,12 @@
     /yMin #2 def
     /yMax #4 def
     #5 % additional PS code
-    \ifPst at polarplot 
+    \ifPst at polarplot
       /@PolarAlgPlot (#6) tx at addDict begin AlgParser end cvx def
       /Func {
         /phi y x atan def
-        /r x y Pyth def 
-        \ifPst at algebraic @PolarAlgPlot \else #6 \fi } def 
+        /r x y Pyth def
+        \ifPst at algebraic @PolarAlgPlot \else #6 \fi } def
     \else
       /Func \ifPst at algebraic (#6) tx at addDict begin AlgParser end cvx \else { #6 } \fi  def
     \fi
@@ -1057,17 +1311,17 @@
     /yPixel yMax yMin sub \pst at number\psyunit mul round cvi def
     /dx xMax xMin sub xPixel div def
     /dy yMax yMin sub yPixel div def
-    /setpixel { 
-      dy div exch 
-      dx div exch 
-      \ifPst at saveData 
+    /setpixel {
+      dy div exch
+      dx div exch
+      \ifPst at saveData
         2 copy
-        \pst at number\psyunit div exch  \pst at number\psxunit div 
-        20 string cvs Pst at data exch writestring 
-        Pst at data (\space) writestring 
-        20 string cvs Pst at data exch writestring 
+        \pst at number\psyunit div exch  \pst at number\psxunit div
+        20 string cvs Pst at data exch writestring
+        Pst at data (\space) writestring
+        20 string cvs Pst at data exch writestring
 %        Pst at data (\string\]) writestring
-        Pst at data (\string\n) writestring 
+        Pst at data (\string\n) writestring
       \fi
       \pst at number\pslinewidth 2 div 0 360 arc fill } bind def
 %
@@ -1078,7 +1332,7 @@
       \ifPst at saveData Pst at data ([\string\n) writestring \fi
       yMin dy \psk at stepFactor\space mul yMax {
 	/y exch def
-	Func 0 lt 
+	Func 0 lt
 	    { VZ { x y setpixel /VZ false def} if }
 	    { VZ {}{ x y setpixel /VZ true def } ifelse } ifelse
       } for
@@ -1092,7 +1346,7 @@
       \ifPst at saveData Pst at data ([\string\n) writestring \fi
       xMin dx \psk at stepFactor\space mul xMax {
 	/x exch def
-	Func 0 lt 
+	Func 0 lt
 	    { VZ { x y setpixel /VZ false def} if }
 	    { VZ {}{ x y setpixel /VZ true def } ifelse } ifelse
       } for
@@ -1105,7 +1359,7 @@
       /y exch def
       xMin dx \psk at stepFactor\space mul xMax {
 	/x exch def
-	Func 0 lt 
+	Func 0 lt
 	    { VZ { x y setpixel /VZ false def} if }
 	    { VZ {}{ x y setpixel /VZ true def } ifelse } ifelse
       } for
@@ -1125,7 +1379,7 @@
   \psplot[fillstyle=none]{#1}{#2}{#4}%     original function
   \ifPst at algebraic
     \psplot[fillstyle=none]{#1}{#2}{-(#4)}
-  \else 
+  \else
     \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis
   \fi
   \multido{\iA=1+1}{#3}{%	 run it #3 times with increment \A
@@ -1134,7 +1388,7 @@
         /dX #2 #1 sub #3 div def % delta x, the step
         /Start dX \iA\space 1 sub mul #1 add def % xStart
         /End Start dX add def                    % xEnd=xStart+dX
-        /Height End Start add 2 div /x ED 
+        /Height End Start add 2 div /x ED
           \ifPst at algebraic (#4) AlgParser cvx exec \else #4 \fi def } % height=f(x)
          % x is the mean between Start+End
       \psellipticarc(!Start 0)(! Height 8 div Height){90}{270}
@@ -1144,9 +1398,9 @@
       % draw the other half of the ellipse
       \rlineto(!dX neg 0)}}% draw a line in negative x-direction
   \psset{fillstyle=none}
-%  \psellipse(#2,0)(!#2 dup #1 sub #3 div 2 div sub /x ED #4 dup 
+%  \psellipse(#2,0)(!#2 dup #1 sub #3 div 2 div sub /x ED #4 dup
 %	 8 div exch)% draw again the ellipse to get the borderline.
-  \psellipse(#2,0)(!{ #2 dup #1 sub #3 div 2 div sub /x ED 
+  \psellipse(#2,0)(!{ #2 dup #1 sub #3 div 2 div sub /x ED
          \ifPst at algebraic (#4) AlgParser cvx exec \else #4 \fi dup
 	 8 div exch})  % draw again the ellipse to get the borderline.
   \psset{plotstyle=line,linestyle=dashed,
@@ -1154,7 +1408,7 @@
   \psplot[fillstyle=none]{#1}{#2}{#4}
   \ifPst at algebraic
     \psplot[fillstyle=none]{#1}{#2}{-(#4)}
-  \else 
+  \else
     \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis
   \fi
   % draw again the curves to get the borderline
@@ -1177,9 +1431,9 @@
 \def\psBezier at ii{%
   \addto at pscode{%
     \psk at plotpoints	    	% step for Bezier T=0,0+epsilon,0+i*epsilon,...,1
-    \pst at BezierType 		% type of the Bezier curve 2,3,4,... 
-    \txFunc at BezierCurve 
-    \ifshowpoints \txFunc at BezierShowPoints \else pop \fi 
+    \pst at BezierType 		% type of the Bezier curve 2,3,4,...
+    \txFunc at BezierCurve
+    \ifshowpoints \txFunc at BezierShowPoints \else pop \fi
   }%
   \end at OpenObj}
 %
@@ -1190,13 +1444,13 @@
 \def\psBernstein{\pst at object{psBernstein}}%  \psBernstein[options](t1,t2)(i,n)
 \def\psBernstein at i(#1,#2){%
   \@ifnextchar({\psBernstein at ii(#1,#2)}{\psBernstein at ii(0,1)(#1,#2)}}
-%  
+%
 \def\psBernstein at ii(#1,#2)(#3,#4){%	(tStart,tEnd)(i,n)
   \addbefore at par{plotpoints=200}%
   \begin at OpenObj
   \addto at pscode{%
     /ScreenCoor { \tx at ScreenCoor } def
-    #1\space #2\space 
+    #1\space #2\space
     1.0 \psk at plotpoints\space div	    	% step=1/plotpoints
     #3\space #4\space
 %   on stack we have tStart tEnd epsilon i n
@@ -1211,7 +1465,7 @@
   \begin at ClosedObj
   \addto at pscode{
     1 1 #3 {
-      dup 
+      dup
       /ipSave ED	% save loop value
       /ip ED		% dito
       1 1 #3 {		
@@ -1218,22 +1472,22 @@
         dup		
         /iqSave ED	% save loop value
         /iq ED		% dito
-        { 
+        {
           iq 0 le { exit } if
-          ip iq mod 
+          ip iq mod
           /ip iq def
-          /iq ED 
+          /iq ED
         } loop
-        ip 1 eq { 
+        ip 1 eq {
           /xVal ipSave iqSave div def
           xVal #1 ge { xVal #2 le {
             \psk at dotsize
             \@nameuse{psds@\psk at dotstyle}
-            \pst at usecolor\pslinecolor xVal 1 iqSave div \tx at ScreenCoor            
+            \pst at usecolor\pslinecolor xVal 1 iqSave div \tx at ScreenCoor
             2 copy pop 0 moveto lineto } if } if
 %            2 copy moveto Dot } if } if
         } if
-      } for 
+      } for
     } for
   }%
   \end at ClosedObj%
@@ -1252,7 +1506,7 @@
       /dx x1 x sub \psk at plotpoints div def
       #3
       /xy {
-%        x 
+%        x
         tx at FuncDict begin
         #4 aload pop \pst at number\psyunit mul exch \pst at number\psxunit mul exch
         end
@@ -1285,7 +1539,7 @@
 \def\psZero{\def\pst at par{}\pst at object{psZero}}
 \def\psZero at i(#1,#2)#3{\@ifnextchar[{\psZero at ii(#1,#2)#3}{\psZero at ii(#1,#2){#3}[0]}}
 \def\psZero at ii(#1,#2)#3[#4]#5{%
-% (#1,#2) Intervall für die Nullstelle, bzw #1 Startwert für Newton, #3 1. Funktion, #4 2. Funktion, #5 Knotenname
+% (#1,#2) Intervall f\"{u}r die Nullstelle, bzw #1 Startwert f\"{u}r Newton, #3 1. Funktion, #4 2. Funktion, #5 Knotenname
  \begingroup
  \pst at killglue
 %  \addbefore at par{fontscale=40,PSfont=Times-Roman}%
@@ -1296,7 +1550,7 @@
    /FunctionB
      \ifPst at algebraic (#4) tx at AlgToPs begin AlgToPs end cvx \else {#4} \fi def
  \ifPst at Newton %   ---------------------------        Newton-Verfahren ---  TS 05.2014
-  /eps 1e-6 def  %                                         eps für (f(x+eps)-f(x))/eps
+  /eps 1e-6 def  %                                         eps f\"{u}r (f(x+eps)-f(x))/eps
   /x0 #1 def     %                                         Startwert wird vorgegeben
   /Xend x0 def
    {
@@ -1330,13 +1584,13 @@
  \pnode(! xM yM){#5}%
  \addto at pscode{
   \ifPst at onlyNode \else
-  /dec \psk at decimals\space def   % Anzahl der Dezimahlen für x
-  /ydec \psk at ydecimals\space def % Anzahl der Dezimalen für y
-  /symb { /Symbol findfont \psk at fontscale\space scalefont setfont } bind def             % Symbolschrift für Klammer und senkrechten Strich
-  /schrift { \psk at PSfont findfont \psk at fontscale scalefont setfont } bind def            % Schrift für die Ergebnisse
-  /TiefSchrift { /Symbol findfont \psk at fontscale 1.6 div scalefont setfont } bind def    % Schrift für tiefergestellte Buchstaben
-  /spdx \psk at fontscale 4 div def % Abstand, der mit der Schriftgöße skaliert ist
-  /spdy \psk at fontscale 15 div def % Abstand, der mit der Schriftgöße skaliert ist
+  /dec \psk at decimals\space def   % Anzahl der Dezimahlen f\"{u}r x
+  /ydec \psk at ydecimals\space def % Anzahl der Dezimalen f\"{u}r y
+  /symb { /Symbol findfont \psk at fontscale\space scalefont setfont } bind def             % Symbolschrift f\"{u}r Klammer und senkrechten Strich
+  /schrift { \psk at PSfont findfont \psk at fontscale scalefont setfont } bind def            % Schrift f\"{u}r die Ergebnisse
+  /TiefSchrift { /Symbol findfont \psk at fontscale 1.6 div scalefont setfont } bind def    % Schrift f\"{u}r tiefergestellte Buchstaben
+  /spdx \psk at fontscale 4 div def % Abstand, der mit der Schriftg\"{o}{\ss}e skaliert ist
+  /spdy \psk at fontscale 15 div def % Abstand, der mit der Schriftg\"{o}{\ss}e skaliert ist
   /Wert { 10 dec exp mul round 10 dec exp div dec 0 eq {cvi 15 string cvs} {15 string cvs } ifelse % x-Wert runden und als string ablegen
   \ifPst at comma dot2comma \fi show } def % gegebenenfalls Komma statt Punkt und Ergebnis anzeigen
   /yWert { 10 ydec exp mul round 10 ydec exp div ydec 0 eq {cvi 15 string cvs} {15 string cvs } ifelse % y-Wert runden und als string ablegen
@@ -1388,7 +1642,7 @@
   \fi\fi}%
  \ifPst at markZeros \psdot(#5)\fi
 \endgroup\use at pscode\ignorespaces
-}% 
+}%
 %
 \catcode`\@=\PstAtCode\relax
 %



More information about the tex-live-commits mailing list