I am new to PStricks. My miktek library has pstricks package installed.
As I ran this code
\documentclass{article}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}(5,5)
\psline(1,1)(5,1)(1,4)(1,1)
\pscircle[linestyle=dotted](3,2.5){2.5}
\pscircle[fillstyle=solid,fillcolor=lightgray](2,2){1}
\end{pspicture}
\end{document}
it is giving me an error saying undefined control sequence.
Here is full version of error:
! Undefined control sequence.
<recently read> \c@lor@to@ps
l.9 \psline(
1,1)(5,1)(1,4)(1,1)
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.
! Undefined control sequence.
\XC@usec@lor ...string \color@ #1#2\endcsname \@@
\fi \space
l.9 \psline(
1,1)(5,1)(1,4)(1,1)
The control sequence at the end of the top line
of your error message was never \def'ed.

xelatex! – Nov 25 '17 at 12:49