\documentclass{article}

\usepackage{pstricks-add}

\begin{document}

\begin{psgraph}(0,0)(2,2){2cm}{2cm}

\psplot[linecolor=red]{0}{2}{x}

\end{psgraph}

\end{document}
