summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-03 21:09:51 +0000
committerKarl Berry <karl@freefriends.org>2017-08-03 21:09:51 +0000
commit93a965bb76ab3c748f5c198d09bd03b4aa87f932 (patch)
tree5a8c7c58012c6e608257bdf409e0f3eea68b049c /Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
parent8fcb0c5c689043e5e4ab34ffe816bab9cf95e382 (diff)
pst-func (3aug17)
git-svn-id: svn://tug.org/texlive/trunk@44944 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex80
1 files changed, 70 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
index 66f4b4a9888..39c151fd184 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
@@ -1334,34 +1334,40 @@ The syntax is:
the sequence $m\ldots n$ is plotted
\end{itemize}
-There is a restriction in using the value for N. It depends to the probability, but in general
-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
+Now \Lcs{psBinomial}, \Lcs{psBinomialF} and \Lcs{psBinomialFS} uses a new code, so the old restriction in using the value for $N$ (old: $N<100$) is no longer valid. A new limit vor $N$ is not searched and it's not found.
+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 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
+which is preset to 15. If your value has more characters when converting into a string, it will
not be printed or cause an GhostScript error.
-Special options are
+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{alternateColors} is a new fillstyle, so the colors alternates between \Lkeyword{fillcolorA} and \Lkeyword{fillcolorB}, only valid for \Lcs{psBinomial}.
+\item \Lkeyword{fillcolorA} alternate color one.
+\item \Lkeyword{fillcolorB} alternate color two.
\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{PrintVLimit} is the value limit for the printed values, default is $1e-64$, smaller values are not printed.
+\item \Lkeyword{Switch2Log} is the value for $N$ where the new calculation is used, default is $80$.
\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{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
+\item \Lkeyword{LeftClipX} gives the left end of the clipping area for \Lcs{psBinomialC}, default is $-1$.
+\item \Lkeyword{RightClipX} gives the distance to $N$ for the right end of the clipping area for \Lcs{psBinomialC}, default is $1$.
\end{itemize}
+
\psset[pst-func]{barwidth=1}
\begin{LTXexample}[pos=t,preset=\centering]
\psset{xunit=1cm,yunit=5cm}%
@@ -1378,7 +1384,7 @@ labelangle=80,LabelColor=blue]{6}{0.4}
\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}
+\psBinomialC[fillstyle=solid,opacity=0.5,fillcolor=cyan]{7}{0.6}
\psBinomial[linecolor=red,markZeros,printValue,fillstyle=solid,
fillcolor=blue,barwidth=0.2,xlabelsep=-0.05]{7}{0.6}
\end{pspicture}
@@ -1392,7 +1398,7 @@ labelangle=80,LabelColor=blue]{6}{0.4}
\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}
+\psBinomialC[showpoints=true]{7}{0.6}
\end{pspicture}
\end{LTXexample}
@@ -1416,7 +1422,7 @@ labelangle=80,LabelColor=blue]{6}{0.4}
\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}%
+\psBinomialC[linecolor=cyan,fillstyle=solid,fillcolor=cyan!50,opacity=0.4]{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}
@@ -1438,6 +1444,57 @@ radiusout=3.5,radiusinL=0,radiusinR=2,LineEnding=true,leftEnd=1,rightEnd=3]{0,10
\end{pspicture*}
\end{LTXexample}
+\begin{LTXexample}[pos=t,preset=\centering]
+\begin{pspicture}[showgrid=false](-.75,-1.8)(13.2,4.7)%
+{\psset{xunit=1cm,yunit=12cm}%
+\psset{plotpoints=500,arrowscale=1.3,arrowinset=0.05,arrowlength=1.9,comma}
+\psaxes[labelFontSize=\scriptstyle,xticksize=0 0,yticksize=0 12,tickcolor=gray!50,Dy=0.05,dy=0.05,Dx=1,dx=1,Ox=0]{-}(0,0)(-0.9,0)(10.8,0.34)
+\uput[-90](11.9,0){$z$} \uput[0](0,0.36){$P_{0,8}^{10}(Z=z)$}\uput[0](0,0.32){$P_{0,7}^{10}(Z=z)$}
+\rput(-0.05,0){%
+\psBinomialC[linecolor=Green,fillstyle=solid,fillcolor=gray,opacity=0.25,plotstyle=curve,linestyle=dashed]{10}{0.8}}
+\rput(0.05,0){%
+\psBinomialC[linecolor=cyan,fillstyle=solid,fillcolor=cyan,opacity=0.25,plotstyle=curve,linestyle=dashed]{10}{0.7}%
+\psBinomial[markZeros,linecolor=cyan,fillstyle=solid,fillcolor=cyan,barwidth=0.2,opacity=0.85]{0,8,10}{0.7}%,printValue
+\psBinomial[markZeros,linecolor=magenta,fillstyle=solid,fillcolor=magenta,barwidth=0.2,opacity=0.85]{9,10,10}{0.7}
+}
+\rput(-0.05,0){%
+\psBinomialC[linecolor=Green,fillstyle=solid,fillcolor=gray,opacity=0.25,plotstyle=curve,linestyle=dashed]{10}{0.8}
+\psBinomial[markZeros,linecolor=DeepSkyBlue4,fillstyle=solid,fillcolor=DeepSkyBlue4,barwidth=0.2,opacity=0.85]{0,8,10}{0.8}%,printValue
+\psBinomial[markZeros,linecolor=BrickRed,fillstyle=solid,fillcolor=BrickRed,barwidth=0.2,opacity=0.85]{9,10,10}{0.8}
+}
+\psaxes[labels=none,xticksize=-2pt 0,yticksize=-2pt 0,tickcolor=black!70,Dy=0.05,dy=0.05\psyunit,Dx=1,dx=1\psxunit,Ox=0]{->}(0,0)(-0.9,0)(12,0.35)
+\rput(5,0.33){\psframebox[fillstyle=solid,fillcolor=orange!30,linestyle=none]{$n=10$}}
+}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\begin{pspicture}[showgrid=false](-.75,-1.8)(13.2,4.7)%
+{\psset{xunit=1cm,yunit=12cm}%
+\psset{plotpoints=500,arrowscale=1.3,arrowinset=0.05,arrowlength=1.9,comma}
+\psaxes[labelFontSize=\scriptstyle,xticksize=0 0,yticksize=0 12,tickcolor=gray!50,Dy=0.05,dy=0.05,Dx=1,dx=1,Ox=0]{-}(0,0)(-0.9,0)(10.8,0.34)
+\uput[-90](11.9,0){$z$} \uput[0](0,0.32){$P_{0,7}^{10}(Z=z)$}
+\psBinomialC[linecolor=cyan,fillstyle=solid,fillcolor=cyan,opacity=0.25,plotstyle=curve,linestyle=dashed,LeftClipX=4,RightClipX=-3]{10}{0.7}%
+\psBinomial[markZeros,linecolor=cyan,fillstyle=solid,fillcolor=cyan,barwidth=0.2,opacity=0.85]{0,8,10}{0.7}%,printValue
+\psBinomial[markZeros,linecolor=magenta,fillstyle=solid,fillcolor=magenta,barwidth=0.2,opacity=0.85]{9,10,10}{0.7}
+\psaxes[labels=none,xticksize=-2pt 0,yticksize=-2pt 0,tickcolor=black!70,Dy=0.05,dy=0.05\psyunit,Dx=1,dx=1\psxunit,Ox=0]{->}(0,0)(-0.9,0)(12,0.35)
+\rput(5,0.33){\psframebox[fillstyle=solid,fillcolor=orange!30,linestyle=none]{$n=10$}}
+}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+{\psset{xunit=0.07cm,yunit=10cm}%
+\begin{pspicture}[showgrid=false](-6,-0.1)(220,1.1)%
+\psset{plotpoints=500,arrowscale=1.3,arrowinset=0.05,arrowlength=1.9,comma}
+\psaxes[labelFontSize=\scriptstyle,xticksize=0 1,yticksize=0 218,tickcolor=gray!50,Dy=0.05,dy=0.05,Dx=10,dx=10,showorigin=false]{->}(0,0)(219,1.05)
+\uput[-90](219,0){$k$} \uput[0](0,1.05){$P(X=k)=B(300;\frac{1}{3};k)$}
+\psBinomial[linecolor=Green,fillstyle=solid,fillcolor=cyan,opacity=0.5,printValue=true,markZeros,fontscale=4,xlabelsep=-0.175,LabelColor=Green,labelangle=80,PrintVLimit=0.01]{1,210,300}{1 3 div}%,printValue
+\psBinomialF[radiusout=1.3,radiusinR=0.9,linecolor=cyan,leftEnd=4,rightEnd=5,linewidth=0.8pt,LineEndColorR=DeepSkyBlue4,LineEndColorL=DeepSkyBlue4,VLines,printValue,fontscale=4,LabelColor=cyan]{0,230,300}{1 3 div}
+\psBinomialFS[radiusout=1.3,radiusinR=0.9,linecolor=red,leftEnd=4,rightEnd=5,linewidth=0.8pt,LineEndColorR=DeepSkyBlue4,LineEndColorL=red,VLines,printValue,fontscale=4,labelangle=50,LabelColor=orange]{0,200,300}{1 3 div}
+\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)$
@@ -1521,6 +1578,9 @@ valid for \Lcs{psBinomialN}. The option \Lkeyword{showpoints} is valid if \Lkeyv
+
+
+
\clearpage
\subsection{Poisson distribution}
Given a Poisson process\footnote{\url{http://mathworld.wolfram.com/PoissonProcess.html}},