[pstricks] problem with pscustom

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Jun 7 08:15:32 CEST 2012


Am 07.06.2012 04:05, schrieb Kin Mye:

> I have read about liftpen, and newpath, etc. But I still do not manage to fix it.


\documentclass{article}
\usepackage{pst-plot}

\begin{document}
\begin{pspicture}(-1,-1)(3,6)
\pscustom[algebraic,linestyle=none,fillstyle=solid,fillcolor=cyan!50]{%
     \psplot{0}{1.5}{x^2}
     \psline(1.5,0)(0,0)
}
\psaxes{->}(3,4)
\psplot[algebraic]{0}{2}{x^2}
\end{pspicture}

\end{document}


see also: 
http://tug.org/PSTricks/main.cgi?file=pst-plot/FunctionExamples#shadingbetween


Herbert


>
> The example is very simple:
>    \pscustom{%
>      \psplot[liftpen=2]{0}{1}{x^2}
>      \psline[liftpen=0](1,1)(1,0)(0,0)
>
>    }
>
> If I understand correctly, psplot makes the path from (0,0) to (0,1) using x^2.
> Then, with psline, I want to go from (1,1) to (1,0). I added the line to (0,0) just in case.
> But I get a shadow in the upper corner: triangle (0,0.5)(0,1)(0.5,1).
>
> I have tried with different options of liftpen in both psplot and psline.
> Also some"moveto"  or newpath"  ... but still cannot fix it.
>
> If I use \psplot[liftpen=2]{0}{1}{0.3*x^2} then the shadow appear around (0,0.3) .... ????
>
>
>
> (I used this feature in the past, but now, if I recompile those figures, I don't get the expected results).
>
>
>
> _______________________________________________
> 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