[pstricks] problem with pscustom
Kin Mye
kinmye at gmail.com
Wed Jun 6 16:50:28 CEST 2012
Dear all,
I have a problem with pscustom. I want to show the area under parabol x^2.
The problem is that I got unwanted hatched area.
In next code, the first picture is the one I want (and don't work): shadow
x^2 from 0 to 1.
Then, I repeated but from -1 to 1. And there, the result is as expected.
Maybe I don't understand how I should close the path in pscustom (??).
Thank you in advance,
\documentclass[a4paper]{article}
\usepackage{pstricks,pstricks-add}
\begin{document}
\psset{algebraic=true,unit=2,linecolor=blue,fillstyle=hlines,fillcolor=gray,
hatchwidth=0.4pt, hatchsep=1.5pt,hatchcolor=blue, unit=1, linewidth=0.7pt}
\begin{pspicture}(1,1)
\psgrid
\pscustom{%
\moveto(0,0)
\psplot{0}{1}{x^2}
\psline(1,1)(1,0)
}
\end{pspicture}
\hspace{4cm}
\begin{pspicture}(-1,0)(1,1)
\psgrid
\pscustom{%
\moveto(-1,0)
\psplot{-1}{1}{x^2}
\psline(1,1)(1,0)
}
\end{pspicture}
\end{document}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20120606/976b6f0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pscustom_problem.png
Type: image/png
Size: 14804 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20120606/976b6f0d/attachment.png>
More information about the PSTricks
mailing list