[pstricks] pst-math

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Nov 30 18:00:23 CET 2005


Hello all,

a nice example with pst-math

Herbert

\documentclass{minimal}
\pagestyle{empty}
\usepackage{pstricks,pst-plot,pst-math}

\makeatletter
\def\psGaussFill{\pst at object{psGaussFill}}
\def\psGaussFill at i(#1,#2)(#3,#4)#5#6{{
   \pst at killglue
   \use at par
   \pscustom[linestyle=none]{%
     \psline(#4,0)(#3,0)
     \psplot[liftpen=1]{#3}{#4}{x #5 #6 GAUSS}%
   }%
   \psplot[fillstyle=none]{#1}{#2}{x #5 #6 GAUSS}%
}\ignorespaces}
\makeatother

\begin{document}

\psset{yunit=5cm, xunit=2cm}
\begin{pspicture}(-4,-0.1)(4,0.65)
   \psaxes[dy=0.2,Dy=0.2,linewidth=0.5pt]{->}(0,0)(-3.5,-0.1)(3.5,0.65)
   \psset{fillstyle=solid,plotpoints=100,linewidth=1pt}
   \psGaussFill[fillcolor=red](-3,3)(-2,-1.25){0}{0.9}
   \psGaussFill[fillcolor=blue](-3,3)(.5,1.5){0.5}{0.9}
   \psGaussFill[fillcolor=red,linestyle=none](-3,3)(-2,-1.25){0}{0.9}
\end{pspicture}

\end{document}




More information about the PSTricks mailing list