[pstricks] Re: clipping in PSTricks

Herbert Voss Herbert.Voss at gmx.net
Sun Apr 10 19:53:03 CEST 2005


El Bandolero wrote:
> In this example I'd like to color gray the region between the parabula and
> horizontal axis, but it doesn't work

you need a closed path

Herbert


\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-plot}
\psset{linewidth=0.4pt,hatchwidth=0.4pt,hatchsep=5pt}
\def\pshlabel#1{\footnotesize #1}
\def\psvlabel#1{\footnotesize #1}
\begin{document}

\begin{pspicture}(-3,-3)(3,3)
   \pscustom[fillstyle=solid,fillcolor=lightgray,linestyle=none]{%
      \psline(-2,0)(2,0)
      \psplot{2}{-2}{2 x 2 exp sub}
   }
   \psframe*[linecolor=white](-2,-2)(2,0)
   \psplot[linecolor=red,linewidth=1pt]{-2}{2}{2 x 2 exp sub}
   \psaxes{->}(0,0)(-3,-3)(3,3)
\end{pspicture}

\end{document}



-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list