[pstricks] poisson-distribution

Herbert Voss LaTeX at zedat.fu-berlin.de
Fri Nov 10 19:02:27 CET 2006


azzam.hassan at voila.fr schrieb:

> Is there any way to obtain the Poisson distribution

with the pst-func.tex from http://perce.de/LaTeX/pst-func/
It is an undocumented feature, because I do not really
know if the macro works in the right way. Parameters are
N and lambda and all the others are the same as for the
distribution macros (see documentation).

Herbert

\documentclass[a4paper,12pt]{article}
\usepackage{pst-func}
\pagestyle{empty}
\begin{document}

\psset{xunit=1cm,yunit=20cm}%
\begin{pspicture}(-1,-0.05)(14,0.25)%
\uput[-90](14,0){$k$} \uput[90](0,0.2){$P(X=k)$}
\psPoisson[linecolor=red,markZeros,fillstyle=solid,
  fillcolor=blue!10,printValue,valuewidth=20]{13}{6} % {N}{lambda}
\psaxes[Dy=0.1,dy=0.1\psyunit]{->}(0,0)(-1,0)(14,0.2)
\end{pspicture}

\vspace{1cm}
The Possion distribution:

\[ P_\lambda(X=k)=\frac{\lambda^k}{k!}\,e^{-\lambda} \]

\end{document}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: poisson.png
Type: image/png
Size: 21333 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20061110/dc2a487e/attachment.png 


More information about the PSTricks mailing list