[pstricks] PSTricks Digest, Vol 175, Issue 2
Denis Vergès
denis.verges at wanadoo.fr
Sun Sep 3 21:03:09 CEST 2017
Sorry but if
%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage{pstricks,pst-plot,pst-func}
\newcommand\ordon[1]{%
\psdots(!#1 \space \f{#1})
\uput[90](!#1 \space \f{#1})%
{\psPrintValue[comma]{\f{#1} 100 mul round 100 div}}}
\begin{document}
\begin{center}
\begin{pspicture}(-2,-1)(5,8)
\newcommand\f[1]{#1 2 exp 4 div}
\psaxes[ticksize=-.1 .1,subticks=2]{->}%
(0,0)(-2,-1)(5,7)[$x$,-90][$y$,180]
\psplot[linecolor=red]{-2}{5}{\f{x}}
\multido{\i=-2+2}{4}{ \ordon{\i}}
\ordon{3.5}
\end{pspicture}
\end{center}
\end{document}
%%%%%%%%%
works fine
the code of Herbert don’t compile :
In the console : Missing $ inserted
l.12 \multido{\i=-2+2}{4}{\ordon{\i}}
and after run I have :
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1900 1 3 %oparray_pop 1899 1 3 %oparray_pop 1883 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
Dictionary stack:
--dict:1163/1684(ro)(G)-- --dict:0/20(G)-- --dict:113/200(L)-- --dict:183/300(L)-- --dict:38/200(L)-- --dict:122/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 161120
GPL Ghostscript 9.07: Unrecoverable error, exit code 1
### FAILED to generate /tmp/altpdflatex.3793-1504465091/antecedentimageH.Voss.pdf ()
Where is the problem ?
Thanks for the quick answer.
Denis
> Le 3 sept. 2017 à 12:00, pstricks-request at tug.org a écrit :
>
> Send PSTricks mailing list submissions to
> pstricks at tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://tug.org/mailman/listinfo/pstricks
> or, via email, send a message with subject or body 'help' to
> pstricks-request at tug.org
>
> You can reach the person managing the list at
> pstricks-owner at tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PSTricks digest..."
>
>
> Today's Topics:
>
> 1. Re: PostScript numbers (Herbert Voss)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 2 Sep 2017 15:50:21 +0200
> From: Herbert Voss <Herbert.Voss at FU-Berlin.DE>
> To: pstricks at tug.org
> Subject: Re: [pstricks] PostScript numbers
> Message-ID: <63d4e0e0-23d6-c86f-44c2-7756cb3f3119 at FU-Berlin.DE>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> 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
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
> ------------------------------
>
> End of PSTricks Digest, Vol 175, Issue 2
> ****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20170903/ad0cd018/attachment.html>
More information about the PSTricks
mailing list