[pstricks] pst-math

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Nov 30 21:30:09 CET 2005


José Emilio Vila Forcén wrote:

>  Nice example! I have only a small suggestion: to replace the last 
> psGaussfill by:
> 
> \psGaussFill[fillcolor=red](-3,-1)(-2,-1.25){0}{0.9}
> 
> Otherwise, the black line above the red filled area is not as visible as 
> in the blue area.

Jose,
indeed and here is another idea with pstricks-add. Looks ugly on
screen, but nice printed with a color laser.

Herbert


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

\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=10cm, 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[style=TRed](-3,3)(-2,-1.25){0}{0.9}
   \psGaussFill[style=TBlue](-3,3)(.5,1.5){0.5}{0.9}
\end{pspicture}

\end{document}


-- 
LaTeX und Perl in der ZEDAT: http://userpage.fu-berlin.de/~latex




More information about the PSTricks mailing list