[pstricks] PostScript numbers

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Sep 2 15:50:21 CEST 2017


Am 02.09.2017 um 10:55 schrieb Denis Vergès:
> Hello,
> 
> In this code :
> 
> %%%%%%%%%
> \documentclass[12pt]{article}
> \usepackage[T1]{fontenc}
> \usepackage[utf8]{inputenc}
> \usepackage{fp}
> \usepackage{pstricks,pst-all,pst-func,pst-plot,pstricks-add}
> \begin{document}
> \newcommand\f[1]{#1 2 exp 4 div}
> \newcommand\ordon[1]{\psdots(!#1 \space \f{#1})	
> \uput[90](!#1 \space \f{#1})%
> {\psPrintValue{\f{#1} 1000 mul round 1000 div}}}

Denis,
do you mean something like this?
    \psPrintValue[comma]{...}

> %\psset{comma=true]

this should be \psset{comma=true}

However, here is a solution with the algebraic mode:

\documentclass[12pt]{article}
\usepackage{pstricks,pst-plot}
\begin{document}
\newcommand*\f[1]{(#1)^2/4}
\newcommand*\ordon[1]{\psdots(*#1 \f{#1})%
	\uput[90](*#1
	\f{#1}){\psPrintValue[algebraic,comma,decimals=3]{#1,\f{#1}}}}
\begin{center}
	\begin{pspicture}(-2,-1)(5,8)
	\psaxes{->}(0,0)(-2,-1)(5,7)[$x$,-90][$y$,180]
	\psplot[linecolor=red,algebraic]{-2}{5}{\f{x}}
	\multido{\i=-2+2}{4}{ \ordon{\i}}
	\ordon{3.5}
	\end{pspicture}
\end{center}
\end{document}

Herbert


More information about the PSTricks mailing list