# PS-Tricks error Undefined control sequence. [\psline{->}]

I get the error

Undefined control sequence. [\psline{->}]

when i try to run the code

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-all}
\usepackage{mathtools}
\begin{document}
\begin{pspicture}[showgrid=false](20,10)
\psline{->}(0,0)(20,0)
\psline{->}(0,0)(0,10)
\psplot{12.879}{17.121}{9-2*(15-x)^2} %Curve 2
\psplot{0.757359}{9.24264}{9-0.5*(5-x)^2}%curve 1
\psline[linestyle=dotted]{}(5,0)(5,9)% Optimum curve 1
\psline[linestyle=dotted]{}(15,0)(15,9) % Optimum curve 2
\psline[linestyle=dotted]{}(13.5,0)(13.5,4.5) % change in curve 2
\psline[linestyle=dotted]{}(0,4.5)(13.5,4.5) % lower horizontal line
\psline[linestyle=dotted]{}(3.5,0)(3.5,7.875) % change in curve 2
\psline[linestyle=dotted]{}(0,7.875)(3.5,7.875) %upper horizontal line

\psline[]{|-|}(3.5,2)(5,2)
\psline[]{|-|}(13.5,2)(15,2)
\psline[]{|-|}(2,4.5)(2,7.875)

\uput[45](4.8,-0.5){$t_1^*$}
\uput[45](3.3,-0.5){$t_1$}
\uput[45](14.8,-0.5){$t_2$}
\uput[45](13.3,-0.5){$t_2$}
\uput[45](4,2.2){$t'$}
\uput[45](14,2.2){$t'$}
\uput[45](0.5,5.8){$u_1\ge u_2$}
\uput[45](-0.5,4.2){$u_2$}
\uput[45](-0.5,7.6){$u_1$}
\end{pspicture}
\end{document}

• This question appears to be off-topic because it is about failing to use xelatex for compilation, so it is not likely to be helpful to future visitors of the site. – Adam Liter Jul 11 '14 at 5:40

The algebraic option is missing:

\psplot[algebraic]{12.879}{17.121}{9-2*(15-x)^2} %Curve 2
\psplot[algebraic]{0.757359}{9.24264}{9-0.5*(5-x)^2}%curve 1

• I still get the same error – Rud Faden Jul 8 '14 at 15:24
• Did you run xelatex or latex? And what system are you running? – user2478 Jul 8 '14 at 16:47
• Ahh.. Using xelatex worked – Rud Faden Jul 8 '14 at 17:01

The solution was to compile with xelatex.

• and_ using the algebraic option ... – user2478 Jul 11 '14 at 7:03