[pstricks] gauss-example & histogram

Daniel Becker daniel.becker at uni-rostock.de
Tue Nov 17 08:57:53 CET 2009


Dear all,

I know I should do this by myself, but...

Has anyone an idea how to add a histogram to the Gauß-Example on the psticks-website?

http://www.tug.org/PSTricks/main.cgi?file=pst-plot/examples#gauss

Thanks -

Daniel


% This is Herbert's example:
\psset{yunit=4cm,xunit=4}
\begin{pspicture}(-2,0)(2,1)
%  \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
  \psaxes[Dy=0.25]{->}(0,0)(-2,0)(2,1)
  \uput[-90](2,0){x}\uput[0](0,1){y}
  \rput[lb](1,0.75){$\sigma =0.5$}
  \rput[lb](-2,0.5){$f(x)=\dfrac{1}{\sigma\sqrt{2\pi}}\,e^{-\dfrac{x^2}{2\sigma{}^2}}$}
  \psplot[linecolor=red, linewidth=2pt]{-1.8}{1.8}{%
    /sigma 0.5 def
    /e 2.718282 def
    /C 1 sigma div 6.2831 sqrt div def
    e x dup mul 2 div sigma dup mul div neg exp C mul}
\end{pspicture}




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4647 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20091117/2d1b781b/attachment.bin>


More information about the PSTricks mailing list