# What is the difference between two commands \psplot?

\documentclass[border=10pt,pstricks,12pt]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}[unit=2cm](-3,-3)(3,3)
\psline{->}(-1.5,0)(1.5,0)
\uput[-90](1.5,0){$x$}
\psline{->}(0,-1.5)(0,1.5)
\uput[0](0,1.5){$y$}
%%%%%
\uput[-135](-1,0){$-1$}
\uput[-45](1,0){$1$}
\uput[135](0,1){$1$}
\uput[-135](0,-1){$-1$}
\psplot[algebraic]{-1.1}{1.1}{x^3} % 1
%%%%
\psclip{\pscircle(0,0){1}}
\pscustom[fillstyle=hlines]{%
\psline(-1.5,0)(1.5,0)
\psplot[algebraic]{1.1}{-1.1}{x^3}}
\endpsclip
%%%%
%\psplot[algebraic]{-1.1}{1.1}{x^3} % 2
\end{pspicture}
\end{document}

With 1, it is no problem as the following

With 2, it has a bit of a problem

Can anyone explain about it?

• Next time please always use the main tag pstricks followed by subtags, for example, pst-plot. Why do we need to do so? Because we usually register/subscribe to the main tag to get notified. :-) May 11 '19 at 12:16

Use

\pscustom[fillstyle=hlines]{%
\psline(-1.5,0)(1.5,0)
\psplot[algebraic]{1.1}{-1.1}{x^3}}%%%%%
\endpsclip

Looks like a bug in \pscustom in conjunction with \psclip

• But, your code was used in my code! :-)
– user173875
May 11 '19 at 9:49
• no, the %%%% are missing! May 11 '19 at 10:04
• @TrongVuong: %%%%% will remove the unwanted trailing white spaces. May 11 '19 at 10:37
• Unbelievable! Oh, I see.
– user173875
May 11 '19 at 10:49