The following code is perfectly executing in TexStudio with XeLaTeX. But not working in Overleaf. Can anybody help me to find the problem ?

    \psscalebox{1.0 1.0} % Change this value to rescale the drawing.
            \rput(0.36892363,-6.3424816){\psaxes[linecolor=black, linewidth=0.04, tickstyle=full, axesstyle=axes, labels=all, ticks=all, ticksize=0.1411111cm, dx=1.0cm, dy=1.0cm](0,0)(0,0)(3,3)}
            \psline[linecolor=black, linewidth=0.04, fillstyle=gradient, gradlines=2000, gradbegin=colour0, gradend=red](0.34892365,-5.3424816)(1.3489237,-6.3224816)(3.0289237,-6.062482)(1.2089237,-4.0024815)(0.38892365,-5.3224816)(0.38892365,-5.3224816)
  • 1
    Do you get an error message? If yes, maybe post it along with the code. Feb 6, 2022 at 4:10
  • Please consider making your title more meaningful to others, I propose "XeLaTeX Document with PSTricks does not Compile on Overleaf". Feb 6, 2022 at 4:15
  • Use lualatex as compiler
    – user187802
    Feb 6, 2022 at 19:09

1 Answer 1


Works for me, I assume that you did not specify the compiler correctly, see screenshots.

enter image description here

enter image description here

FYI, this is the error message I get when I use pdfLaTeX as the compiler:

\c@lor@to@ps ->\PSTricks 
l.13     }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .