[pstricks] uput parameter value

Poul Riis Poul.Riis at skolekom.dk
Mon Nov 7 17:53:10 CET 2005


... and how can I uput a postscript-parameter?
The line
\uput[45]{45}(!xmax xmax dup mul A mul){A='the value of A'}%
below should be modified. How?

Yours,
Poul Riis


\listfiles
\documentclass{article}

\usepackage{pstricks-add}

\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}%
\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}




More information about the PSTricks mailing list