[pstricks] Error message from pstricks-add

Herbert Voss LaTeX at zedat.fu-berlin.de
Sun Jan 1 20:25:53 CET 2006


Hiroshi Ina wrote:

> I am having a problem with the example of pst-plot and pstricks-add that
> is seen at http://tug.org/PSTricks/pst-plot/gauss0.tex.
> 
> Below , I am attaching the LaTeX source as it is and the error message I got.
> I'd appreciate it if someone could help me find the problem.
> 
> Best Regards,
>   H.I
> 
> ============= LaTeX source from http://tug.org/PSTricks/pst-plot/gauss0.tex
> \listfiles
> \documentclass[12pt,a4paper]{article} % Herbert Voss <voss at perce.de> 2004-06-26
> 
> \usepackage{pst-plot}
> \usepackage{pstricks-add}
> \usepackage{amsmath}

\def\pshlabel#1{\footnotesize#1}\def\psvlabel#1{\footnotesize#1}

> \begin{document}
> 
> \psset{yunit=4cm,xunit=4}
> \begin{pspicture}(-2,0)(2,1)
> %  \psgrid[griddots=10,gridlabels=0pt, subgriddiv=0]
>   \psaxes[xyLabel=\footnotesize,Dy=0.25]{->}(0,0)(-2,0)(2,1)

    \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}
> 
> \end{document}

the xyLabel is obsolete, see pstricks-add-doc!
Look also at pst-func or pst-math. Both provide a Gauss function

Herbert




More information about the PSTricks mailing list