For reasons I cannot explain \def's don't seem to always work in/with \psplot as shown below
\documentclass[english, landscape, a4paper]{slides}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{babel}
\usepackage{fp}
\usepackage{pst-plot}
\usepackage{pstricks}
\usepackage[active,tightpage]{preview}
\PreviewBorder=4pt
\PreviewEnvironment{pspicture}
\begin{document}
\begin{center}
\begin{pspicture*}(-1.5,-1)(1.5,1.5)
\def\tI{0.0}
\psplot{0.0}{1.0}{x \tI sub} % does not work
% \psplot{0.0}{1.0}{x \tI sub} % works
\end{pspicture*}
\end{center}
\end{document}
I compile the above file with xelatex file and get the error
Error: /undefined in 0.0sub
Operand stack:
--nostringval-- 0.0 0.0
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %s
--nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_
pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %error
ingval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nos
...
** WARNING ** Filtering file via command -->mgs.exe -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -s
yLevel=1.3 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorIm
/FlateEncode -dUseFlateCompression=t
Can someone please suggest a workaround for this problem?


\spaceafter\tl– Click Me Sep 29 '12 at 17:45\tIgets ignored while reading the input (it follows a command name) and the error line0.0subshows it. However, the common trick of putting{}after the command can't work here, while\spacedoes the right thing. – egreg Sep 29 '12 at 17:47