[pstricks] A little help deciphering code and a question

Scott, Randy Scott_Randy at sccollege.edu
Tue May 6 17:24:40 CEST 2014


Thanks for everything!

Randy Scott
Dept. Chair, Mathematics
Santiago Canyon College



-----Original Message-----
From: PSTricks [mailto:pstricks-bounces at tug.org] On Behalf Of Herbert
Voss
Sent: Monday, May 05, 2014 11:58 PM
To: pstricks at tug.org
Subject: Re: [pstricks] A little help deciphering code and a question

Am 05.05.2014 19:34, schrieb Scott, Randy:


> And finally realized that \pscustom was finishing the horizontal line
at (2,2), then jumping down to (0,2) to begin the parabola.
> 
> When I changed this to
> 
> \definecolor{SuperLightBlue}{cmyk}{0.2,0,0,0}
> 	\pscustom[fillstyle=solid,fillcolor=SuperLightBlue,
>       linestyle=none]
>     {
>       \psplot{0}{2}{2}
>       \psplot{2}{0}{0.25*x^2+1}
>     }
> 
> so the parabola is being drawn from (2,2) to (0,2), everything worked
great.

Use \lineto or \moveto for lines (\closepath draws a strait line to the
beginning of the path):

\documentclass{article}
\usepackage{pst-plot}
\definecolor{SuperLightBlue}{cmyk}{0.2,0,0,0}
\begin{document}

\begin{pspicture}(4,4)
\psaxes{->}(4,3)
\pscustom[fillstyle=solid,fillcolor=SuperLightBlue,linecolor=blue]{%
     \moveto(0,2)
     \psplot[algebraic]{2}{0}{0.25*x^2+1}% x=2...0
     \closepath
}
\end{pspicture}

\begin{pspicture}(4,4)
\psaxes{->}(4,3)
\pscustom[fillstyle=solid,fillcolor=SuperLightBlue,linecolor=blue]{%
     \psplot[algebraic]{0}{2}{0.25*x^2+1}% x=0...2
     \lineto(0,2)
     \closepath
}
\end{pspicture}

\end{document}

Herbert


_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/




More information about the PSTricks mailing list