[pstricks] uput parameter value

Poul Riis Poul.Riis at skolekom.dk
Mon Nov 7 22:02:11 CET 2005


There is still some error:
`PST-func' v0.38, 2004/11/08 (Herbert Voss))) (uput_parameter.aux)
! Undefined control sequence.
<argument> A=\psPrintValue 
                           [PSfont=Courier,fontscale=10]{A}

My file now looks like this:

\listfiles
\documentclass{article}

\usepackage{pstricks-add}
\usepackage{pst-func}

\pagestyle{empty}


\definecolor[ps]{bl}{rgb}{tx at addDict begin Red Green Blue end}
\newcommand{\rainbowcolor}[1]{\pstVerb{/lambda #1 def lambda tx at addDict
begin wavelengthToRGB end}}%
\newcommand{\parab}[3]{%
\SpecialCoor%
\pstVerb{/F #1 def%
/A 1 4 div F div def%
/xmax #2 def%
}%
\rainbowcolor{#3}%
\color{bl}
\psplot[linewidth=2pt,linecolor=bl,plotpoints=100]{0}{xmax}{x dup mul A
mul}%
\psline[linewidth=1pt,linecolor=bl](!xmax 2 div 2)(!xmax 2 div xmax 2 div
dup mul A mul)(!0 F)%
\uput[45]{45}(!xmax xmax dup mul A
mul){A=\psPrintValue[PSfont=Courier,fontscale=10]{A}}%
}
%\uput[45]{45}(!xmax xmax dup mul A mul){A=\the\value{A}}%
%\uput[45]{45}(!xmax xmax dup mul A mul){A='the value of A'}%

\begin{document}
\begin{figure}[!h]
\centering
\psset{xunit=2cm,yunit=2cm}
\begin{pspicture}(0,0)(2,2)
\psaxes[Dx=1,Dy=1,linewidth=1pt, labels=all,%
     ticksize=-3pt 0]{->}(0,0)(2,2)
\uput[270](2,0){$x$}
\uput[180](0,2){$y$}
\parab{0.5}{1}{400}
\parab{0.75}{1.5}{450}
\parab{1}{2}{500}
\end{pspicture}%
\end{figure}
\end{document}

Yours,
Poul Riis




More information about the PSTricks mailing list